bwaldvogel / log4j-systemd-journal-appender

Log4j appender for systemd-journal that maintains structured log data
BSD 3-Clause "New" or "Revised" License
24 stars 14 forks source link

Added logLoggerAppName parameter in SystemdJournalAppender #13

Open MMaiero opened 3 years ago

MMaiero commented 3 years ago

We have added the possibility to specify, in the log4j file, the name of the Application logging using this appender in order to have that name reported in the journal key for the logger. In this way, if specified by the user, instead of having the key LOG4J_LOGGER the journal will be filled with APPNAME_LOGGER where APPNAME is specified in the log4j file by the logLoggerAppName attribute.

bwaldvogel commented 3 years ago

Your PR contains import order and formatting changes that I wouldn’t like to merge.

Also: Why would you want to change the journal key instead of setting syslogIdentifier to the name of the application?

MMaiero commented 3 years ago

Hi, thank you for the reply.

For the import order and formatting changes, you are right. I can review the commit to remove those changes.

Regarding the journal key for the logger it was mainly a request to be able to change it and have something more "tied" to the application instead of having LOG4J_LOGGER reported. Yes, we are using also the syslogIdentifier.