Parameterized message

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Parameterized message

candy.chiu.ad
Hi, what's the most efficient way to log parameterized messages?

By the way, Is this type of call supported?

                        log.Debug("{0} {1} {2} {3} {4} {5}",
                            o.p1, o.p2, o.p3, o.p4, o.p5, o.p6 );

Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: Parameterized message

Jarek Kowalski
Administrator
Yes, it's supported - this is the preferred way of emitting log entries, since string.Format() will not be called until the message actually needs to be output.

Jarek
NLog Blog
Reply | Threaded
Open this post in threaded view
|

Re: Parameterized message

candy.chiu.ad
How about if I am calling NLog via the Common.Logging framework?