rudedude420 Posted January 20, 2015 Share 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. Link to comment Share on other sites More sharing options...
Czar Posted January 20, 2015 Share 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 Link to comment Share on other sites More sharing options...
Mysteryy Posted January 21, 2015 Share 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 Link to comment Share on other sites More sharing options...