Michael Giroux wrote:

Stefano,

On 10/17/06, Stefano Nichele <[EMAIL PROTECTED]> wrote:

and I should log any message in both loggers and i should redirect to
the myDebugLogger the log coming from some user...ehmmm....i'm
confused....can you give me more details ?


messages logged to x.y.z.debug will be sent automatically to x.y.z, so
you only need to log to x.y.z for the normal case, and use the
x.y.z.debug logger for the cases where you want more information.

At the top of your module you might include an assignment:

Logger log = (debuggingUser) ? myDebugLogger : myLogger;

Then in the rest of the method refer to the local log variable.

As I said, I might not understand what you are attempting to do.

Michael


I think you understood my requirements. And now I understand how your suggestion works. I see a disadvantage in this implementation because i will not be able to have static Logger instance in my code and static methods (or singleton class) can not have a logger based on the user. So basically this solution works fine if i don't use static methods and singleton class. This can be acceptable... but unfortunately not in my case.... Or am i worng ? Or do you have a suggestion to work also in the aforementioned cases ?

Thanks a lot
Ste


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




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

Reply via email to