I'm working on a C# application, using the NLog
library.
Log.Info()
generates an output, which looks like the following:
2023-07-24 09:04:19.4423 | Info | Company.Customer.Manager.DoSomething | Some information
I would like to change that, and in the NLog.xml
, I have found entries like:
<code>${longdate}|${level:uppercase=true}|${logger}|${message}</code>
... but there are some drawbacks:
- I have found over 30 of those entries in
NLog.xml
, belonging to members with following names:M:NLog.Targets.TargetWithLayout.#ctor
,P:NLog.Targets.TargetWithLayout.Layout
,M:NLog.Targets.NetworkTarget.#ctor
, and so on. - The entries have the following structure:
<member name="...">
<summary>
Some information
</summary>
<remarks>
The default value of the layout is:
<code>${longdate}|${level:uppercase=true}|${logger}|${message}</code>
</remarks>
</member>
=> basically it looks "just" like a remark.
So my questions are:
- Is it correct that the configuration of the
NLog
is somewhere in the remark of a member? - If yes, how can I know which member?
- If no, where can I find that configuration?
Oh, before I forget: I don't have an NLog.config
file.