www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Logger For D Design Doc

reply sybrandy <sybrandy gmail.com> writes:
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Hello,

As promised, I took some time to create a small document (just a text 
file) to describe a potential logger for D.  Glog was a major influence 
on how the design turned out, though there are some differences.

Please note it's not a 100% solution yet.  Hopefully this is closer to 
what Andrei is looking for.  All I ask is that those that are interested 
in this please take your time when looking this over before responding 
and please do ask questions, comments, etc.

Thanks and enjoy!

Casey
Sep 03 2010
next sibling parent sybrandy <sybrandy gmail.com> writes:
Apologies, but it appears I left in a section I should have 
removed...ignore the "NOTES" section that contains a bulleted list.  The 
rest of the document describes everything in that list in better detail.

Casey
Sep 03 2010
prev sibling parent BCS <none anon.com> writes:
Hello sybrandy,

 Hello,
 
 As promised, I took some time to create a small document (just a text
 file) to describe a potential logger for D.  Glog was a major
 influence on how the design turned out, though there are some
 differences.
 
 Please note it's not a 100% solution yet.  Hopefully this is closer to
 what Andrei is looking for.  All I ask is that those that are
 interested in this please take your time when looking this over before
 responding and please do ask questions, comments, etc.
 
 Thanks and enjoy!
 
 Casey
 

With regards to timestamps, why not record the timestamp at the time the logging call is made and format it later? I would place most of the overhead in the writer thread while avoiding the issue of time stamps not reflecting the calls to the log functions. BTW, having the lines in the log file out of order is a minor issue to me. Having the time stamps not be guaranteed to be in the order that the log statement are called would be a major flaw. -- ... <IXOYE><
Sep 06 2010