[prev in list] [next in list] [prev in thread] [next in thread] 

List:       logback-user
Subject:    [logback-user] log a whole transaction if a condition is satisfied
From:       "Borja Ruiz" <bortx10 () gmail ! com>
Date:       2007-11-20 11:24:56
Message-ID: f5fec2d90711200324p526c2ee8q1caa13452356b8f1 () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hello,

I'm writing an application and I would like to use logback features to model
this scenario:

My application processes client requests. Each request is identified by a
transaction id, that appears on each log message. What I want to do is log
all transaction messages if a condition in one transaction message is
satisfied.

For example, if my application generates those messages:

[INFO] [transactionId=10] Searching...
[INFO] [transactionId=11] Searching...
[INFO] [transactionId=10] response=false
[INFO] [transactionId=11] response=true
[INFO] [transactionId=10] Finished
[INFO] [transactionId=11] Finished

And my condition is that variable "response" is set to true, my application
output should be:

[INFO] [transactionId=11] Searching...
[INFO] [transactionId=11] response=true
[INFO] [transactionId=11] Finished

I've tried to figure out using buffered appenders to maintain log messages,
filters to check conditions and triggers to decide when to log messages, but
couldn't find a suitable solution. I would like to know if there is a way of
solving this problem using logback provided features, or ideas to develop my
own logback components.

Thanks a lot!

[Attachment #5 (text/html)]

Hello,<br><br>I&#39;m writing an application and I would like to use logback features \
to model this scenario: <br><br>My application processes client requests. Each \
request is identified by a transaction id, that appears on each log message. What I \
want to do is log all transaction messages if a condition in one transaction message \
is satisfied.  <br><br>For example, if my application generates those \
messages:<br><br>[INFO] [transactionId=10] Searching...<br>[INFO] [transactionId=11] \
Searching...<br>[INFO] [transactionId=10] response=false<br>[INFO] [transactionId=11] \
response=true <br>[INFO] [transactionId=10] Finished<br>[INFO] [transactionId=11] \
Finished<br><br>And my condition is that variable &quot;response&quot; is set to \
true, my application output should be:<br><br>[INFO] [transactionId=11] Searching... \
<br>[INFO] [transactionId=11] response=true<br>[INFO] [transactionId=11] \
Finished<br><br>I&#39;ve tried to figure out using buffered appenders to maintain log \
messages, filters to check conditions and triggers to decide when to log messages, \
but couldn&#39;t find a suitable solution. I would like to know if there is a way of \
solving this problem using logback provided features, or ideas to develop my own \
logback components. <br><br>Thanks a lot!<br><br>



_______________________________________________
Logback-user mailing list
Logback-user@qos.ch
http://qos.ch/mailman/listinfo/logback-user


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic