Logging in a Darkstar Environment

Within a simple SDK environment, logging isn’t much of an issue. Just using something like log4j will work fine, for the most part. It’s not too hard to figure out what is going on by going through your server logs.

I do have a few concerns though that mostly deal with a clustered environment, but may be issues even in the SDK environment.

  1. Let’s say we have a task that is logging what it is doing. Halfway done, and by no fault of it’s own, it get’s canceled and rescheduled. I can see at the very least how the logs can get a bit confusing, We might see something like this

– Do step 1 of the task
– Do step 2 of the task (btw, this must only occur once)
– Task is canceled
– Task is reschedules
– Do step 1 of the task
– Do step 2 of the task (btw, this must only occur once)

So while our task was in a transaction and it’s step 2 only performed once, it’s log message about it performing occured more than once. This isn’t that big of a deal, but I was wondering if their will be any optional way to perform “transactional” logging? Possibly have some messages not actually log until the task commits?

  1. This is the more important question. In a clustered environment managed by a 3rd party, Has any thoughts been given about where the logs are going? How are they might be made available to the developer? And any thoughts about consolidating logs across the nodes in a cluster?

I hope all that makes sense, thanks.

Actually the server does nto use log4j.

Log4j is there because MINA depends on it, but we use the J2SE logging APIs for all our logging and recommend clients do the same. In regards your transactional questions, this will ensure that, if you have logging turned on for the TaskManager, you will get log entries about commit and abort of tasks in proper order with your own logging, which will mitigate a lot of that confusion your concerned with.

The answer to 2 is yes, we’re thinking a lot about it. It goes hand in hand with the rest of the administration tools for the production servers, Having said that, right now our development bandwidth is consumed just getting the production servers ready. Administration will likely dribble out in later releases.