Log everything to console and disable logging to server.log

106 views
Skip to first unread message

Ben Erridge

unread,
Jun 27, 2017, 4:17:45 PM6/27/17
to Payara Forum
We use CentOS 7.3 in production and all of our servers systems logs are consolidated using various OS tools. I'd like to leverage those existing tools by just logging to the console and letting systemd push them to the system log.

I'd like to configure Payara to only log messages to the console and nothing to server.log or any other file for that matter.

I found that if I start Payara up with --verbose then it will log to console as I want but I'm not sure if this is an OK thing to do in production? Also I have not been able to turn off the file logging. I came up with a little hack to link server.log to /dev/null but I am not fond of that solution.




Mike Croft

unread,
Jun 27, 2017, 4:40:09 PM6/27/17
to Payara Forum
Hi Ben,

Payara can actually log directly to the syslog by enabling a checkbox in the admin console. This way, you can skip out systemd and you also don't need to keep Payara Server in the foreground using the --verbose flag.

IIRC, it should be a (relatively) obvious checkbox in the Logger settings. Give me a shout if you can't find it and I'll dig around for it myself.

Mike

Ben Erridge

unread,
Jun 27, 2017, 4:46:40 PM6/27/17
to Payara Forum
Mike,
I did see that flag in the admin console. I haven't ever tried it. Will stop the logging to the file?
Also I am trying to script the deployment , do you know how I can set that flag through asadmin?
Thanks
Reply all
Reply to author
Forward
0 new messages