Reputation: 147
I'm able to change trace levels for Liberty via the Bluemix UI but the settings don't seem to persist across restarts. Is this expected/by-design? If so, this would make debugging your application startup much harder.
I could change the log levels within server.xml but because I'm using Cloud Foundry, that's a lot of work to just change a single setting that already has a UI
Upvotes: 2
Views: 332
Reputation: 1151
You should add the server.xml as part of your app push command so it will persist between restarts. When you restart a runtime, a new buildpack is created and started. Its behaviour at starting is modified by your server.xml or any supported environment variable (but I am not aware of any for tracing).
Check how to push server.xml as part of your app here: https://console.ng.bluemix.net/docs/runtimes/liberty/optionsForPushing.html
Upvotes: 1
Reputation: 1249
you should set the trace level in server.xml
enable tracing on the server side by adding this to your server.xml:
<logging traceSpecification="com.ibm.ws.jmx.*=all"/>
Then you have to push your server package:
1) Create a directory that is named defaultServer.
2) Create an apps directory in the defaultServer directory.
3) Copy your WAR or EAR file into the defaultServer/apps directory.
4) In the defaultServer directory, create your own server.xml file
After the server directory is ready, you can deploy it to Bluemix.
$ cf push <yourappname> -p defaultServer
You can also push a packaged server file to Bluemix. The packaged server file is created by using Liberty's server package command.
as mentioned by Jose Miguel you can find more information here: https://console.ng.bluemix.net/docs/starters/liberty/index.html#optionsforpushinglibertyapplications
Upvotes: 1