Open fmhwong opened 3 years ago
@fmhwong, I think you are not only recommend to the openshift guide but also to all the cloud guides, right? How about the guides are using docker or kubernetes?
cc @yeekangc
I would recommend to use JSON logging in all cloud guides as all cloud service should have some sort of log aggregation feature such as LogDNA, EFK, etc. For guides that run on local docker, you can leave it as plain text logging as it may be easier to read.
Thank you @fmhwong Would you post what should be configured? I assume just update the server.xml, right?
Need to consider the following guides
Based on https://openliberty.io/docs/latest/log-trace-configuration.html#_json_logging, add following to the server.xml
<logging messageFormat="json" messageSource="message,trace,accessLog,ffdc,audit" />
I think the best practice is to set the environment variables for containers so that you don't need to rebuild the image if you want to change it in the future.
@fmhwong It means better to do it through yaml
We can further break this down into one issue for each cloud guide that needs to be updated.
It is recommended to use JSON format for Liberty log when running in containers so that the log entries can be aggregated and analyzed by EFK.