setting the console logging formation using asadmin

Skip to first unread message

Joey Officer

unread,
Jun 14, 2021, 5:17:16 PM6/14/21
to Payara Forum
We're trying to update our console logging from the default ULF to JSON log format.  However, the documentation that I find  here  only references the ability to change the log format for the log file, not the console.

If I log in through the web admin interface, I can change the console log format to JSON, but I haven't found the equivalent command using asadmin.

configuration -> server-config -> logger settings
there are two log format options - console logging format and log file logging format

any help would be greatly appreciated.

Joey

Joey Officer

unread,
Jun 15, 2021, 1:12:04 PM6/15/21
to Payara Forum
Was able to track this down last night, using the recorder in Payara.  The relevant changes I made are:

set-log-attributes --target=server-config java.util.logging.ConsoleHandler.formatter='fish.payara.enterprise.server.logging.JSONLogFormatter' 
set-log-attributes com.sun.enterprise.server.logging.GFFileHandler.formatter='fish.payara.enterprise.server.logging.JSONLogFormatter'  

Hopefully this is useful to someone in the future.

Joey
Reply all
Reply to author
Forward
0 new messages