OK, Urban, I understand. I don't think you will find what you are looking for inside the framework though.
Just a question; since you use the short form format specifier "%r", does this mean that you use the old version 1.2.8? Or are you using 1.2.9? (It took me a while to find the list of format specifiers but they are here: http://logging.apache.org/log4net/release/sdk/log4net.Layout.PatternLayout.h tml) My way to solve your problem would be to use %timestamp (or %r if you want), and then process the log file separately. It would be quite easy to calculate the differences, using Excel for example. A (really small) note to our maintainers (Nicko et al.): The text on the manual page mentioned above says: "Each conversion specifier starts with a percent sign (%) and is followed by optional format modifiers and a conversion character. The conversion character specifies the type of data, e.g. logger, level, date, thread name." "A conversion character" is not correct any more is it? Sincerely, Göran Roseen -----Original Message----- From: Urban Jaroslav, Ing. [mailto:[EMAIL PROTECTED] Sent: den 22 november 2005 10:03 To: [email protected] Subject: RE: PatternLayout - add time increment 2 Göran Roseen ------------------------------------ Thanx for tip, but it is not exactly what I am looking for. This timestamp just shows the time increment since logging is started. I am looking rather for time difference between logged events. I found that for timestamp can be used char r, which is inserted in PatternLayout. Did you mean this? r - Used to output the number of milliseconds elapsed since the start of the application until the creation of the logging event. 2 Nicko Cadell ----------------------------------- Just difference between actual event and event called before. See better example (see values in first bracket column): 2005-11-08 11:15:42,106 [0,012] [3444] INFO XmlService --->GetSoapBody 2005-11-08 11:15:42,341 [0,235] [3444] INFO XmlService --->XSDValidation 2005-11-08 11:15:45,652 [3,311] [3444] INFO XmlService --->XSLTValidation Then I can see the highest values of time increment, which I am interested in. JU -----Original Message----- From: Urban Jaroslav, Ing. Sent: Tuesday, November 08, 2005 12:24 PM To: [email protected] Subject: PatternLayout - add time increment Hi all, I looked for solution how I could insert to log file an time increment consecutive records. As I studied the PatternLayout for log4net, found no possibility to achieve it. Is there anyone who solved it or it is not possible? Thanks for any response, bye Jaroslav Urban An example: 2005-11-08 11:15:42,106 [0,000] [3444] INFO XmlService [] - -->GetSoapBody 2005-11-08 11:15:42,106 [0,000] [3444] INFO XmlService [] - -->Validation 2005-11-08 11:15:43,106 [1,000] [3444] INFO XmlService [] - -->XSLTValidation Specification: - log4net v1.1.1.33753 - IIS project - using Dot.Net Fr1.1
