Skip to content

logging into different files #201

Answered by reidmorrison
gingerlime asked this question in Q&A
Discussion options

You must be logged in to vote

Correct, by design Semantic Logger writes all log messages to the same file (appenders). This becomes more relevant when you move up to a centralized logging solution so that all the log entries can be alerted on or searched centrally.

If you really want to log to 2 different files, that can be done by using 2 file logging appenders pointing to 2 different files.

On the first log file appender add a filter to exclude all Sidekiq log messages. On the second log file appender add a filter that only includes Sidekiq log messages. https://rocketjob.github.io/semantic_logger/filtering.html

With a single log file it is simple to use grep to include or exclude all Sidekiq messages when viewing t…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by reidmorrison
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #59 on January 17, 2022 21:05.