I'm using an application that logs via log4j. I have multiple instances of the app running on different solaris boxes (each box running sun app server 8.2). All apps use the same log4j.properties file. My problem is I'm receiving different data in the logs.
More specificially, the %t variable, which should give me the thread id. On one box, I get "[service-j2ee]", while on another one I get "[service-j2ee-3]" (or some other thread number).
I need the box that isn't writing the thread number to write the thread number in the log. Otherwise, I can't debug by tracing things through the logs if multiple users are testing.
Does anyone have any idea where that value is set?
If I understand that right, you aren't complaining that you don't get the name of the thread, you're complaining that you don't like the thread names that you are getting in the logs. At least that would be the case if your pattern included the string "[%t]".
So it really sounds to me like your question is "How do I control the names of the threads which Sun App Server creates?" Does that sound right? Or is your pattern something more complicated which is truncating the thread names?
Joined: May 20, 2002
Paul, it's not that I don't like the thread name... but on one server I get the threadname-threadID, and on the other I get just the threadName. I need to figure out where I turn on threadID.
Both are using the same log4j.properties with [%t] in the pattern.
Okay. So your question is about that Sun server then. That isn't an open source project, as far as I know, so let's try moving this post to a more relevant forum. I'm guessing "Other Java Products and Servers"...
Joined: May 20, 2002
Thanks. I wasn't sure if that [%t] was set at a server level, or some place else... My thinking was someone familar with log4j might know where it came from. But anyplace you think I can get an answer.
Like I said (and l did hunt down the documentation to confirm I wasn't guessing), it's the thread name. The logging code has no control over those names, it just reports what it is given, that's why I don't think this is a question about log4j.