Changing Log location from console to file

I have installed logstash using docker. It is running fine. It seems by default in docker installation, log output goes to console. I want that log output should go to file too along with console.

For this I added the below config items to my logstash log4j.properties file

appender.file.type = File
appender.file.name = LOGFILE
appender.file.fileName = /usr/share/logstash/logs/logstash.log
appender.file.layout.type = PatternLayout
appender.file.layout.pattern = [%d{ISO8601}][%-5p][%-25c] %m%n
After that I restarted docker containing logstash using below command

docker restart logstash

But logs are not getting written to log file. It is still going to console. What else I am missing . Also , how to identify the console log file
Any help will be highly appreciated.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.