Quote:
Originally Posted by ixtab
@dragon123: You're not providing enough information. Are you getting an error? If so, which? Did you bundle log4j with your application, or make sure that log4j is actually supported?
|
log4j is already on the Kindle at /opt/amazon/ebook/sdk/lib/log4j-1.2.16.jar and it works well when configured properly when writing to the allowed locations (/mnt/us/developer/kindlet_name/work/*).
Quote:
Originally Posted by ixtab
Still, I think that log4j is a massive overkill for what you're trying to do. If all you want to do is output some text to a file, I suggest to simply write an extremely simple Logging utility yourself.
I'm using this trivial peace of code in JBPatch. You could of course create something more prowerful, with logging levels etc. - but it will still be MUCH less complicated than using a full-blown logging framework like log4j.
|
Why not using a standard solution instead of writing an inferior version yourself? Logging seems trivial but you quickly get into difficult waters. Log levels seem easy enough but what about rotating log files or multiple log files (I usually configure log4j to output errors also into a separate file)?