Logstash- Create different logfiles for different pipeline

Hi,

I am using logstash log4j2.properties configuration for log controlling e.g. log rotation, log preservation, controlling file name for logging, location of logs etc.

Based on below discussion I used to configure log4j2.properties.

I have 3 pipelines running on my log stash environment.
PipelineA.config, PipelineB.config, PipelineC.config but due to log4j2.properties configuration it is writing only in one log file logfilename.logs

I want 3 different log files for different pipelines, and create 3 separate log files for easy debugging.
PipelineA.config should write in PipelineA.log file.
PipelineB.config should write in PipelineB.log file.
PipelineC.config should write in PipelineC.log file.

How is this possible by log4j2.config ?

Thanks in Advance.

Hi @praffuln

Are you using this setting in logstash.yml ?

pipeline.separate_logs: true

# ------------ Other Settings --------------
#
# Where to find custom plugins
# path.plugins: []
#
# Flag to output log lines of each pipeline in its separate log file. Each log filename contains the pipeline.name
# Default is false
pipeline.separate_logs: true

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