I have deployed a simple JAVA application on BlueMix (Liberty for Java) that logs messages out to the console using the JAVA Log4j library.
Here the content of the log4j.properties file:
log4j.rootLogger = DEBUG, STDOUT
log4j.appender.STDOUT=org.apache.log4j.ConsoleAppender
log4j.appender.STDOUT.layout=org.apache.log4j.PatternLayout
log4j.appender.STDOUT.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
I cannot see these logs at somewhere. I tried STDOUT and I even tried the good old.
System.out.println().
But when I invoke this CLI command:
cf logs <myApp> --recent
I only see the deployment messages from Bluemix like:
2016-09-08T23:38:32.01+1000 [App/0] OUT[INFO] CWWKF0008I: Feature update completed in 10.583 seconds.
2016-09-08T23:38:32.01+1000 [App/0] OUT [AUDIT] CWWKF0011I: The server defaultServer is ready to run a smarter planet.
The other alternative is to log to a file such as:
log4j.appender.FILE.File=${log}/logs/logging.log
But I cannot see/access the WebSphere log files either.
Can someone please let me know how I can manage logging on BlueMix for JAVA?