I don't see the value of doing it your way instead of using wait and
notify (unless the threads run on different machines or something like
that) but have you considered using the WARN level?  Similar to Javier
I think it would be best to use a different logger higherarchy branch
for the messages.

On 2/16/06, Hanumant Mastikh <[EMAIL PROTECTED]> wrote:
> Hi,
>
>    I am a log4j user since 2001 (the wistful "1.1.3"  version), and my life 
> as a software developer changed completely. Log4j  has given me many moments 
> of debugging joy, and over the years I have  been an active evangelist of its 
> merits. (Now I use "1.3 alpha 8" and  people say I'm crazy using an alpha 
> version in commercial products, but  hey: that's the kind of confidence I 
> have in log4j!)
>
>     Now, the problem I'm facing:
>
>     I have developed a wonderful piece of code that will be used by  millions 
> worldwide, but I have signed a NDA, so I cannot tell you what  I'm talking 
> about. Anyhow, the application executes several threads and  I synchronize 
> them with log4j.
>
>     For instance: if Thread_3 must wait for the execution of Thread_1 and 
> Thread_2, I send to the logs:
>
>     Thread_1 executed.
>     Thread_2 executed.
>
>     Then Thread_3 reads the logs and proceeds with execution.
>
>     This works fine, but I'm using the INFO log level for this messages and  
> now the client wants to change the configuration to ERROR (because the  with 
> INFO he will get very large log files), so my synchronization  messages do 
> not appear and the application halts. I have changed the  synchronization 
> messages to use the ERROR level, but when the client  sees error messages he 
> automatically opens a bug request! I've tried to  explain that this is not a 
> bug, but they are not very technical and  don't seem to understand. They have 
> sent a technical person to our  office, but when I explained the problem to 
> him, he just looked at me  with his eyes wide open. I don't think that he 
> understood the problem,  he was very quiet and didn't seem very smart.
>
>     Anyhow, the client doesn't want to see error messages, and since the  
> client is always right, I'm asking you to create a SYNCHRONIZE log  level so 
> I can insert my synchronization messages. I would do this  myself and send 
> you the code, but I'm already swamped with the  "right-to-left text 
> converter" firefox extension that I'm writing (it's  very useful for 
> accustomed Urdu readers, since Urdu is written in  right-to-left).
>   Best regards,
>   Hanumant Mastikh
>
>   PS - In an internal seminar we had recently, I made a presentation of  this 
> synchronization trick, and the audience (mostly developers) was  very excited 
> and told me that they were going to implement their  threads using this 
> solution, so I think the SYNCHRONIZE log level will  become a success in the 
> near future!
> ",1]  );  D(["mb","
>   \n\t\n\n\t\n\t\t
> ---------------------------------
>  \nJiyo cricket on Yahoo! India cricket
> \nYahoo! Messenger Mobile Stay in touch with your buddies all the time.\n
> ",0]  );  D(["ce"]);    //-->
>
>     Best regards,
>     Hanumant Mastikh
>
>     PS - In an internal seminar we had recently, I made a presentation of  
> this synchronization trick, and the audience (mostly developers) was  very 
> excited and told me that they were going to implement their  threads using 
> this solution, so I think the SYNCHRONIZE log level will  become a success in 
> the near future!
>
>
>
> ---------------------------------
>  Jiyo cricket on Yahoo! India cricket
> Yahoo! Messenger Mobile Stay in touch with your buddies all the time.
>


--
James Stauffer
Are you good? Take the test at http://www.livingwaters.com/good/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to