2,907 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
1
answer
77
views
NLog 6.0.7 Multiple archives created in multi-process logging setup
I have a multi-process application (one orchestrator and multiple workers) where all processes write to the same log file using NLog 6.
The log file is configured to be archived:
daily (ArchiveEvery=...
0
votes
1
answer
65
views
NLog.Web.AspNetCore not formatting object as JSON
I'm trying to log error objects as JSON in my ASP.NET Core 9 Web API. I am following the wiki in the NLog documentation: Structured logging.
I have NLog.Web.AspNetCore v6.0.5 as a dependency. In ...
0
votes
1
answer
53
views
Is it possible to log ApplicationBuilder configuration failure?
I'm using NLog with ApplicationBuilder. The problem is that application startup failure is not captured with NLog. Is there something I can do with it, or should I report this to MS?
Here is the ...
1
vote
0
answers
126
views
NLog does not archive the file
In my WCF / C# project, I am using Nlog, it successfully creates logs inside the current date folder, but it does not archive the log files.
NLog.config:
<nlog xmlns="http://www.nlog-project....
0
votes
0
answers
68
views
NLog not creating log file on user machine
NLog doesn't create one text log file (specific log) on a user's machine although it does create a different text log file (catch-all log) in the same folder.
Here's the config:
<targets>
&...
1
vote
1
answer
143
views
Using ILogger and Message Templates how does NLog decide date/time format for output?
As part of converting a custom logging solution to ILogger using NLog to output the data, I'm looking at how the "${message}" is generated.
I know for most types, the ToString is used to ...
0
votes
1
answer
62
views
How can I change nlog logging level based on event properties
I have created a custom event property in my logging, to categorise different logs from different areas. I want to be able to set a default logging level of Info, but then increase the logging level ...
0
votes
0
answers
41
views
Blazor Server, Nlog ScopeContext - property propagation to all components and services
In my Blazor Server app I have LoggingCircuitHandler:
public sealed class LoggingCircuitHandler
: CircuitHandler
{
private readonly ILogger<LoggingCircuitHandler> _logger;
private ...
0
votes
1
answer
64
views
Custom NLog Layout Render with support of inner layout
I'm trying to map predefined Elastic Search indices with ASP environment variable value with the following custom layout render:
[LayoutRenderer("elk-environment-index")]
public ...
-2
votes
1
answer
65
views
Wrong ClassName in Logging [closed]
Some time ago I injected NLogs for ILogger see the link bellow.
Prism Unity Register NLog as Microsoft.Extension.Logging.ILogger<T>
No some time after I recongnized that the Classname is wrong. ...
0
votes
1
answer
106
views
Nlog.config - logging http context related data into app-log.txt from background process
I had a problem with logger invoked from Quartz
<target name="logfile" xsi:type="AsyncWrapper">
<target name="logfileInternal" xsi:type="File" ...
1
vote
0
answers
65
views
Logging to SEQ from NLOG while making the seq url variable configurable in nlog.config
I tried many things, both programatically and via nlog.config, and none of it works:
<variable name="sequri" value="${environment:variable=SeqUri}" />
<target
...
0
votes
1
answer
94
views
Limit argument length in console output while keeping full length in log files using NLog
I have configured NLog (5.3.4) in my ASP.NET Core project (.NET 5.0) and am using ILogger from Microsoft.Extensions.Logging which is injected through DI. Now I'm logging messages with parameters like ...
0
votes
0
answers
49
views
TransactionalMSMQ target in Nlog.config file is not pushing messages to the queue when upgraded NLog to 5.4 from 4.6.4
I am working on a .Net project where i use Logger from Microsoft.Extensions.Logging to log the errors to be seen in event viewer as well as to push the messages to the MSMQ.
When i had nuget package ...
1
vote
0
answers
121
views
Logging from .NET Maui to iOS not working using NLog.Targets.MauiLog
I'm writing a Maui app in Visual Studio, primarily for iOS, and I want to implement logging.
I've set up NLog.Targets.MauiLog based on the readme here: https://github.com/NLog/NLog.Targets.MauiLog
...