logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jesper Lund Stocholm <Jesper.LundStoch...@ciber.dk>
Subject Asynchronous logging
Date Wed, 21 May 2014 07:06:26 GMT
I am having a threading issue [0] in my code, where I have used log4net to try to figure out
what is going on (so the issue is not about log4net)

Can you guys confirm a couple of things for me:

1. log4net logs asynchronously such that logging does not affect my primary code
2. The timestamps of the log entries are synchronous according to the "main code" and not
created somewhere deep within log4net?

The reason I am asking (in particular) the last question is that I am in doubt on whether
I can trust the timestamps of the log (in a rollingfileappender) and thereby be able to deduct
the timing of my code?

An example of my logs is here:

2014-05-20 15:20:45,855 INFO - IgnorableTurbines get lock
2014-05-20 15:20:45,855 INFO - Getting ignorable turbines
2014-05-20 15:20:45,857 INFO - IgnorableTurbines update locked
2014-05-20 15:20:45,863 INFO - Item removed: ignorableturbines
2014-05-20 15:20:45,866 INFO - IgnorableTurbines re-added
2014-05-20 15:20:45,867 INFO - IgnorableTurbines update released
2014-05-20 15:20:45,868 INFO - IgnorableTurbines get released
2014-05-20 15:20:45,871 ERROR - Value cannot be null.

The log entries 3, 4, 5, 6 (starting from 1) are created by an event being fired when an item
is removed from my cache. The other log entries are created by my main thread.

Can you help me clarify this?

[0] My issue is described in detail here: http://stackoverflow.com/questions/23761310/preventing-dirty-reads-when-refreshing-memorycache-via-cacheentryremovedcallback

Med venlig hilsen / Best regards

Jesper Lund Stocholm
Senior Architect

t:   +4544662466
m: +4530945570
jesper.stocholm@ciber.com
www.ciber.com<http://www.ciber.com/>

[cid:image001.png@01CEDF31.59E73800]


[cid:image002.png@01CEDF31.59E73800]<http://www.facebook.com/ciber> [cid:image003.png@01CEDF31.59E73800]
<http://twitter.com/ciberinc>  [cid:image004.png@01CEDF31.59E73800] <http://www.linkedin.com/groups?mostPopular=&gid=123828>
[cid:image005.png@01CEDF31.59E73800]<https://mvp.support.microsoft.com/profile/Jesper.Lund.Stocholm>


Mime
View raw message