Logger listener

Started by Thomas., January 28, 2013, 11:17:57 PM

Previous topic - Next topic

Thomas.

Please, could you implement listener for Logger? It is for testing on many devices and easier debugging. I want to save warning and error messages into file. Thanks

something like:
public void log(String msg, int type);

EgonOlsen


EgonOlsen

#2
Here you go: http://jpct.de/download/beta/jpct_ae.jar

I've added an interface called LogHandler that you can implement. It basically uses the signature you suggested but adds a return value. If you return true, jPCT-AE's Logger will continue with it's normal logging operation after returning from the method. If you return false, no logging will be done and no exceptions will be raised. It's up to you to handle that is this case.

Thomas.