log4j-systemd-journal-appender icon indicating copy to clipboard operation
log4j-systemd-journal-appender copied to clipboard

Added logLoggerAppName parameter in SystemdJournalAppender

Open MMaiero opened this issue 4 years ago • 2 comments

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.

MMaiero avatar Oct 20 '20 09:10 MMaiero

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?

bwaldvogel avatar Nov 15 '20 10:11 bwaldvogel

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.

MMaiero avatar Nov 18 '20 07:11 MMaiero