Posts

Showing posts with the label logging

Turning off JDK logging

I've been developing a simple little command line application and one of the libraries I'm using seems to log debug information to the console. To clean up the console output, I had to turn off the JDK by using: LogManager.getLogManager().reset(); This seemed to do the trick for me, but it sounds like in some cases you may need to go a bit further and turn off logging at the global logger level: LogManager.getLogManager().reset(); Logger globalLogger = Logger.getLogger(java.util.logging.Logger.GLOBAL_LOGGER_NAME); globalLogger.setLevel(java.util.logging.Level.OFF);

Viewing server log files

I think viewing server logs has always been more difficult than it should have been for me. For example, when I'm developing and debugging applications deployed to the dev and test servers, if you want to see the various log files involved it requires: Logging in to the server (if you have an account) Finding the log files (if you remember where they are and have permissions to read them) Tailing in a console Some places its not trivial to get accounts and permissions - but anyway, the point is it takes more time than its worth to find that log file and see whats going on. To make it easier, I created vsConsole - a java (grails) based web application that polls agents on the servers - so with a couple of clicks you can be tailing your favourite log file on your dev/test server. It works well for our testers that I work with on my day job - it saves them the hassle of ssh and unix accounts and permissions. The convenience of a browser based application is in their opin...