Quote:
Originally Posted by bhaak
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/*).
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)?
|
You're correct of course. I didn't even realize that the Kindles came with log4j preinstalled

- so yeah, in that case your answer is probably what the OP is looking for.
That said, I personally dislike log4j for reasons I can't really explain... maybe I'm spoilt by past experiences with it.
... And IMO, the usual
Kindlet isn't exactly a complex application server that requires extensive logging with 7 different log levels, log file rotation etc. As the saying goes: "use the right tools for the right job". In my particular case, the trivial solution was enough. In other cases, a more complex and powerful solution may be better.