[logback-user] Logs targeting Excel Pivot Tables

Thorbjørn Ravn Andersen thunderaxiom at hotmail.com
Thu Apr 11 15:41:56 CEST 2013


Thanks for your response.

 

It is not as much converting it into a form recognized by the Excel importer
– I just use tabulator characters for that – but to get the data suited
directly for further analysis by Excel.

 

For instance I do not believe that the 2013-04-02 10:34:32,479 time stamp is
immediately useful (and I also need timezone support), so I was looking at
simply generating the number (fractional days since the Excel epoch) which
Excel can then be told is a date and handle accordingly.

 

Do you have any experiences like that to share?

 

Thanks 

 

/Thorbjørn

 

From: logback-user-bounces at qos.ch [mailto:logback-user-bounces at qos.ch] On
Behalf Of Donald McLean
Sent: 2. april 2013 16:37
To: logback users list
Subject: Re: [logback-user] Logs targeting Excel Pivot Tables

 

Wouldn't you want to just use a different pattern, one that has commas
between the fields?

Something like this:

%date,%level,%thread,%logger{10},%file,%line],%msg%n

I tried it and it produced content that looked like this:

2013-04-02
10:34:32,479,TRACE,Scanner-2,e.s.e.m.EFLContext,EFLContext.scala,220],servic
es: Set(edu.stsci.efl.logging.LogbackService at 2e751271)
2013-04-02
10:34:32,483,TRACE,Scanner-2,e.s.e.m.EFLContext,EFLContext.scala,213],[main]
(Tue Apr 02 10:34:32 EDT 2013):
Set(edu.stsci.efl.logging.LogbackService at 2e751271)
2013-04-02
10:34:32,483,TRACE,Scanner-2,e.s.e.m.EFLContext,EFLContext.scala,213],lookin
g for: edu.stsci.efl.services.LoggerFactoryService
2013-04-02
10:34:32,483,TRACE,Scanner-2,e.s.e.m.EFLContext,EFLContext.scala,213],Some(e
du.stsci.efl.logging.LogbackService at 2e751271)
2013-04-02
10:34:32,484,DEBUG,Scanner-2,e.s.e.d.DBModule,DBModule.scala,35],Starting
DBModule
2013-04-02
10:34:32,485,TRACE,Scanner-2,e.s.e.m.EFLContext,EFLContext.scala,213],[main]
(Tue Apr 02 10:34:32 EDT 2013):
Set(edu.stsci.efl.logging.LogbackService at 2e751271)
2013-04-02
10:34:32,485,TRACE,Scanner-2,e.s.e.m.EFLContext,EFLContext.scala,213],lookin
g for: edu.stsci.efl.services.PropertyService
2013-04-02
10:34:32,486,TRACE,Scanner-2,e.s.e.m.EFLContext,EFLContext.scala,213],None

 

On Tue, Apr 2, 2013 at 3:59 AM, Thorbjørn Ravn Andersen
<thunderaxiom at hotmail.com> wrote:

Hi.

 

I want to create a log file which is not directly intended to be readable by
humans but to use with Pivot Tables in Excel to generate reports (e.g. over
http requests and their duration spread over the day for several months,
that kind of thing).

 

I was wondering what the best approach for doing that would be.

 

My guess would be a tab-separated file (to allow Excel to read it in as a
CSV-file), with the first field being the timestamp in an Excel compatible
form (e.g. a number formatted as a timestamp), and the remaining fields the
individual items I need to analyze.  (This is what I generate right now
using ad-hoc Perl)

 

(We can calculate on that 99.99% of the time that the application will exit
with System.exit(0) in my main method, so it is not super important with
having a solution robust against e.g. OutOfMemoryError, but I would like one
that does not build a large data structure in memory like using JExcel to
generate a spread sheet on the fly).

 

Anyone who has experimented with this and have experiences to share?

 

Thanks

 

/Thorbjørn

 

 

 


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




-- 
Family photographs are a critical legacy for
ourselves and our descendants. Protect that
legacy with a digital backup and recovery plan. 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20130411/487c255b/attachment.html>


More information about the Logback-user mailing list