JSR Logging
February 14th, 2008
No comments
Here is the promised example of java.util.logging logs working with beanmill:
Handler socket = new ObjectOrientedSocketHandler("localhost", 4445); Logger logger = Logger.getLogger("de.cismet.nameyourlogger"); logger.setLevel(Level.ALL); logger.addHandler(socket); for (int i=0;i<1000;++i) { logger.log(Level.SEVERE, "log this !!! "); }
you need the class ObjectOrientedSocketHandler which is included originally in the lumbermill project (The codebase for beanmill).
Click on more to see the code of the ObjectOrientedSocketHandler and embed it in your project if you want.