NLog Argument

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

NLog Argument

shapper
Hello,

I have the following parameters on NLog.config

  <parameter name="@Created" layout="${date:universalTime=true}" />
  <parameter name="@Data" layout="${data}" />
  <parameter name="@Message" layout="${message}" />

I want @Data to be a custom parameter value. Something like:

   NLog.Logger logger = NLog.LogManager.GetLogger("My Logger");
   logger.Info("My Info", new { data = "My Data" });

However, I always get an error with my NLog configuration.

How can I do this?

Thank You,
Miguel