tags:

views:

30

answers:

1

I'm working on an application for a device which supports a subset of Java 1.1.8/1.2, specifically the classes in the following packages:

  • java.lang
  • java.io
  • java.util
  • java.net
  • java.lang.reflect
  • java.util.zip
  • java.math
  • java.text
  • java.security

I want to include quite a bit of logging in this application to make troubleshooting and support easier.

Ideally I would use log4j, but even the version of log4j which supports SDK 1.1.8 requires java.beans among other things.

Is there another logging framework which has fewer dependencies, or am I stuck rolling my own?

My plan is to log to disk which means that a feature like log4j's RollingFileAppender would be useful for keeping the logs a reasonable size, but all in all I'm not too picky about features as long as it beats rolling my own (which I will end up doing if I have to).


I found the following frameworks, but none of them will work on my device.

  • simple-log: Requires 1.4
  • MicroLog: Java ME
  • Java Logging Framework: Unavailable classes
  • Java Logging Suite: This might actually work if I do not use the threadsafe logger (which uses Collections.synchronizedList from java.util), but it's basic enough and there are enough differences in my needs that I think I'll be better off rolling my own.
A: 

You say you have java.util, so do you have java.util.logging?

djna
No. java.util.logging was added in 1.4 (reference: http://download.oracle.com/javase/1.4.2/docs/api/java/util/logging/package-summary.html).
Lawrence Johnston