Took long time to save a logfile

Post questions here regarding the CodeSite Express edition

Took long time to save a logfile

Postby janhomann » Wed Sep 19, 2012 8:36 am

Hi there,

i tried to implement a few logmessages for one project. So i set up the CodeSite logger to write to an logfile, added some logmessages and started the project. After a few seconds my project exited normally and i could see the logfile growing and growing. I implemented much log messages and in the end the size of the logfile was 960mb. It took the dispatcher 6 hours to write the logfile. Is it possible to speed the saveprocess up?
janhomann
 
Posts: 3
Joined:
Wed Sep 19, 2012 8:24 am

Re: Took long time to save a logfile

Postby Raize Support » Wed Sep 19, 2012 8:45 am

What were you logging in a few seconds that ended up being 960 MB in size?

Ray
Raize Software Support
Raize Software
http://www.raize.com
Raize Support
 
Posts: 622
Joined:
Fri Mar 25, 2011 9:04 pm

Re: Took long time to save a logfile

Postby janhomann » Wed Sep 19, 2012 9:24 am

The project is an optimization for glas.
I used the Delphi Studio XE with CodeSite Express Version 4.6.1

The definition of the destination is done with:
Code: Select all
Dest := TCodeSiteDestination.Create( Application );
Dest.LogFile.Active := True;
Dest.LogFile.FileName := 'optimization.csl';
Dest.LogFile.FilePath := '$(MyDocs)';

CodeSite.Destination := Dest;


In several lines i added a
Code: Select all
  CodeSite.ConnectUsingCopyData;

just to avoid out-of-memory errors.

Jan
janhomann
 
Posts: 3
Joined:
Wed Sep 19, 2012 8:24 am

Re: Took long time to save a logfile

Postby Raize Support » Wed Sep 19, 2012 5:34 pm

Hi Jan,

Thanks for the additional info. What I am more interested in, however, is what kind of data are you sending using the CodeSite.Send* methods? Are you send really long strings, string lists, objects, etc. And how often are you sending the information? That is, are you sending the messages in some kind of loop, a message handler, etc.

When a large amount of data needs to be captured, it is common to break up the log file into multiple parts. However, the part support is only available in the Studio Edition.

Ray
Raize Software Support
Raize Software
http://www.raize.com
Raize Support
 
Posts: 622
Joined:
Fri Mar 25, 2011 9:04 pm

Re: Took long time to save a logfile

Postby janhomann » Thu Sep 20, 2012 1:32 am

Hi Ray,

at the moment i just log CodeSite.EnterMethod('FunctionName') and CodeSite.ExitMethod('FunctionName') in every function of one unit in my project. I tried to get an overview of the path, the software uses to optimize a few glas panels. This realy worked very good with the CodeSite logger. In the 960mb logfile there where something about 4.000.000 messages. Maybe i just have to remove some messages.
janhomann
 
Posts: 3
Joined:
Wed Sep 19, 2012 8:24 am

Re: Took long time to save a logfile

Postby Raize Support » Thu Sep 20, 2012 1:49 am

Hi Jan,

Wow, that's a lot of messages. The challenge of logging is to log enough information that helps you find what you are looking for, but not so much that there is just too much noise. I suspect that a lot of those 4 M messages are not that important. Perhaps you can greatly simplify the log by only logging the enter/exits of some of the core methods of your unit.

Ray
Raize Software Support
Raize Software
http://www.raize.com
Raize Support
 
Posts: 622
Joined:
Fri Mar 25, 2011 9:04 pm


Return to Express Edition

Who is online

Users browsing this forum: No registered users and 1 guest

cron