nlog-configuration

Why do I get FormatException with NLog?

与世无争的帅哥 提交于 2021-01-28 08:56:47
问题 I get the fllowing in the internal NLog log : 2020-05-10 16:38:09.9251 Warn Error when formatting a message. Exception: System.FormatException: The input string had an incorrect format. vid System.Text.StringBuilder.FormatError() vid System.Text.StringBuilder.AppendFormatHelper(IFormatProvider provider, String format, ParamsArray args) vid System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args) vid System.String.Format(IFormatProvider provider, String format,

Why do I get FormatException with NLog?

无人久伴 提交于 2021-01-28 08:42:22
问题 I get the fllowing in the internal NLog log : 2020-05-10 16:38:09.9251 Warn Error when formatting a message. Exception: System.FormatException: The input string had an incorrect format. vid System.Text.StringBuilder.FormatError() vid System.Text.StringBuilder.AppendFormatHelper(IFormatProvider provider, String format, ParamsArray args) vid System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args) vid System.String.Format(IFormatProvider provider, String format,

How to apply different layouts to the same target in NLog?

∥☆過路亽.° 提交于 2019-12-09 11:02:19
问题 NLog allows me to use SplitGroup to log my messages to several targets. I'd like to use this feature to log each message to a common, user-specific and date-specific logs at once: <variable name="commonLog" value="${logDir}\Common.log" /> <variable name="username" value="${identity:fSNormalize=true:authType=false:isAuthenticated=false}" /> <variable name="userLog" value="${logDir}\ByUser\${username}.log" /> <variable name="dateLog" value="${logDir}\ByDate\${shortdate}.log" /> <target name=