logging-log4net-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From George Chung <geo...@glympse.com>
Subject Re: asynchronous logging
Date Tue, 30 Jul 2013 18:31:16 GMT
If you authored your own AsynchronousAdoNetAppender that uses the new .NET
async/await constructs, you could use the TPL library to wrap the
ado.netasync operations as a Task.

Then if you *avoid *calling ConfigureAwait(false), I'm pretty sure the
completion routine will complete on the original ASP.NET request thread, in
which case you'll have access to the original HttpContext that started the
request.



On Tue, Jul 30, 2013 at 8:31 AM, Farrington, Linda
<lfarrington@aclara.com>wrote:

>  We are trying to log asynchronously using an asynchronousadonetappender
> inherited from adonetappender.   Logging standard properties seems to work
> fine, but custom properties do not.  I understand that this is because the
> asynchronous appender is logging the messages on another thread and we're
> storing the custom properties in the logicalthreadcontext (tried
> threadcontext = as well to no avail).  My question is this:  If I cannot
> use the threadcontext when running asynchronously, how should I pass custom
> properties into log4net.  Has anyone else done this?  Can anyone provide
> any suggestions?****
>
> ** **
>
> Thanks in advance,****
>
> ** **
>
> Linda****
>
> ** **
>
> ** **
>
> ** **
>

Mime
View raw message