Hi all.
I am using Payara Micro (Uber jar). I am passing the filename of the log file that I want to use via --logToFile.
I am also trying to change the log levels for my packages, and are using --logProperties to pass in my level (via logging.properties), however if I do that it does not create my log file anymore (as defined in --logToFile)
Any tips ? Thanks.
logProperties takes precedence over the logToFile. You will have to add a file logger into your logging.properties.
OK cool, So I omit the --logToFile and in --logProperties add the following:
handlers=java.util.logging.FileHandler
handlerServices=com.sun.enterprise.server.logging.GFFileHandler
com.sun.enterprise.server.logging.GFFileHandler.file=myServer.log
Where myServer.log is what I would have passed in --logToFile.
Something like that ?
Thanks for the reply !
:)
An example used in Payara Micro is
#Payara Micro Logging Properties File
handlers=java.util.logging.FileHandler, java.util.logging.ConsoleHandler
java.util.logging.ConsoleHandler.formatter=com.sun.enterprise.server.logging.ODLLogFormatter
java.util.logging.ConsoleHandler.level=FINEST
java.util.logging.FileHandler.limit=50000
java.util.logging.FileHandler.count=1
java.util.logging.FileHandler.level=INFO
java.util.logging.FileHandler.formatter=com.sun.enterprise.server.logging.ODLLogFormatter
java.util.logging.FileHandler.append=true
java.util.logging.FileHandler.pattern=payara-server%u.log
Awesome !! Thanks very much ! Love the quick response :)
Most helpful comment
An example used in Payara Micro is