View Single Post
Old 12-13-2013, 03:14 PM   #8
bhaak
Groupie
bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.bhaak can program the VCR without an owner's manual.
 
bhaak's Avatar
 
Posts: 164
Karma: 164969
Join Date: Dec 2011
Device: Palm IIIx, (iPhone|Kindle) Touch
Quote:
Originally Posted by ixtab View Post
@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 View Post
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)?
bhaak is offline   Reply With Quote