[slf4j-user] logging progress through loggers...

LuVar luvar at plaintext.sk
Tue Sep 17 12:59:00 CEST 2013


Hello,
I am using log4j now on one of my older app. I have there a small library which allows me to log progress of anything happening in my applications. I just do something like this:

this.log.info(ProgressMadeMessage.newFirstMsg("import user dictionary));
//do some work
this.log.info(ProgressMadeMessage.newFirstMsg("import user dictionary), 8);
//do some work
this.log.info(ProgressMadeMessage.newFirstMsg("import user dictionary), 19);
//do some work
this.log.info(ProgressMadeMessage.newFirstMsg("import user dictionary), 55);
....

Than I have my own appender defined and I visualize progress made by asynchronous task. My appender is able also to predict (few old run times are saved) trend of progress.

I have now migrated to slf4j. It allows only to log strings. This makes logging of my ProgressMadeMessage instances impossible. Is there some performance non problematic solution to my needs? (serializing ProgressMadeMessage instances to String and than backwards is possible, but performance will be hurt a lot)

Thanks for advice,
--
LuVar


More information about the slf4j-user mailing list