www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: Thomas. on January 28, 2013, 11:17:57 pm

Title: Logger listener
Post by: Thomas. on January 28, 2013, 11:17:57 pm
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:
Code: [Select]
public void log(String msg, int type);
Title: Re: Logger listener
Post by: EgonOlsen on January 29, 2013, 07:09:39 am
I'll have a look...
Title: Re: Logger listener
Post by: EgonOlsen on January 29, 2013, 10:15:04 pm
Here you go: http://jpct.de/download/beta/jpct_ae.jar (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.
Title: Re: Logger listener
Post by: Thomas. on January 29, 2013, 10:25:54 pm
Great! thanks ;)