rudedude420 Posted January 20, 2015 Posted January 20, 2015 I want to write anything logged to the console using the osbot logger (org.osbot.utility.Logger) to a simple log/text file. Seeing as osbot implemented their own logger I cannot simply add a filehandler like I would with the JCL logger, I'm wondering if there is any standard or 'correct' way to do this.
Czar Posted January 20, 2015 Posted January 20, 2015 (edited) You can override OSBot's logger just as you can do so for paint, onLoop, onMessage etc, just make your own @Override public void log(String message) { //save message to file } This is what does the logging: getBot().getLogger().debug(message); Edited January 20, 2015 by Czar
Mysteryy Posted January 21, 2015 Posted January 21, 2015 You can override OSBot's logger just as you can do so for paint, onLoop, onMessage etc, just make your own @Override public void log(String message) { //save message to file } This is what does the logging: getBot().getLogger().debug(message); Should just be able to call super() and then add the additional file output afterwards (inside of the overridden log method). 1