nlog Questions
4
Solved
I want to add a string to each row on my NLog output. The logic stays the same, trying to get the current user and if succeed, add the current user to the output.
I know how to implement it each ...
1
Solved
How can I enable the following in NLog that produces the shown output:
using (_logger.BeginScope("Starting processing"))
{
_logger.LogInformation("Algorithm1 Initalized");
_lo...
4
Solved
The NLog documentation explains how to configure NLog for .NET Core applications by using an nlog.config XML file. However, I'd prefer to have just one configuration file for my application - appse...
Discerning asked 21/5, 2019 at 21:10
3
Solved
I am using ASP .Net Core 2.1 WebAPI. Is it possible to log the current request body and headers with the configurations of the NLog?
<?xml version="1.0" encoding="utf-8" ?>
<nlog xmlns="h...
Forcer asked 30/7, 2018 at 11:13
2
How can I turn off Microsoft info level logging in nlog / .netcore ?
I still want info logging for my other loggers
I currently have:
<rules>
<logger name="Microsoft.*" minlevel="Erro...
Drawback asked 21/5, 2018 at 10:46
2
Solved
I'm trying to send the output to the console (or colouredconsole) ... which I'm hoping would (also?) go to the Visual Studio's Output window for any ASP.NET web site/app/mvc app.
It doesn't by defa...
2
Solved
I've added NLog using nuget to a project and added NLog.config. I'm running the debugger and getting a NullReferenceException due to the fact LogManager.Configuration is null:
LogManager.Configura...
1
Solved
My application has too much log.Trace() at the beginning of the program, causing the program to malfunction, so I can't use general NLog configuration to increase the log level.
So, I would like to...
2
Solved
I am using NLog for logging.
Currently my Layout-String is:
"${date:format=dd.MM.yyyy HH\\:mm\\:ss,fff} | ${level:uppercase=true} | ${message}"
This results in the following Logs:
18.12.2013 1...
Factitious asked 18/12, 2013 at 10:34
4
Solved
Is it possible/easy to mock NLog log methods, using Rhino Mocks or similar?
Cripps asked 7/2, 2011 at 5:57
3
Solved
I am using Microsoft Application Insights for my Web Application. I used the Application Insights TraceListener NuGet package for logging. That worked perfectly.
Now I would like to switch to NLog...
Biogeography asked 29/4, 2014 at 15:43
2
Solved
I've created a console application using Microsoft.Extensions.Logging that uses a service layer.
Program.cs
public static void Main(string[] args)
{
// Create service collection
var serviceCollec...
Hudspeth asked 19/9, 2017 at 8:11
1
Solved
We are using NLog in our .net 5.0 Web API and feel like log levels are set in multiple places. Is there a way we can configure nLog to use the app settings and ignore nLog.config log levels?
nlog.c...
Divisive asked 10/12, 2021 at 16:53
2
I have a solution with an ASP.NET Core (2.1.5) Web API project which references a couple of .NET Standard 2.0 class libraries projects.
I want to implement some logging to my application and I ha...
Westphal asked 18/11, 2018 at 17:57
3
Solved
I am working to build an API using WebAPI, and have been using NLog for logging throughout the stack. My API solution has two main projects including:
The website layer itself that implements the...
Pennington asked 2/6, 2015 at 10:40
1
How do I set up the mix? I have no problems configuring Application Insights and NLog but I have no idea how to correlate operations. I use latest version of NLog so it's aware of System.Diagnostic...
Rhapsodic asked 13/9, 2016 at 13:44
1
Solved
I am trying to use NLog on my project and following these steps
I wonder how I could define the NLog lines in my Program.cs because there are no Main() and CreateHostBuilder() for Blazor server sid...
Hunter asked 25/11, 2021 at 6:33
2
I've been trying to get Nlog to send logging to a database, but the examples I've found all return an internal nlog error. I'm using dependency inject in a console application with .NET 5.0...:
Inf...
4
I am trying to implement a simple log using Nlog Refresh 1.0 for a class Library project.
It seems nlog does not create a logfile when it's instantiated from within a dll.
Is there some other way ...
2
Solved
I'd like to set all loggers to log to a file except one for a specific class. I can't seem to figure out how to do it. Currently I'm trying the following nlog.config
No matter what I do, the inter...
Alarcon asked 22/6, 2015 at 4:14
2
below config was my nlog setting, this setting send mail is OK .
<target name="mail" xsi:type="Mail"
smtpServer="SMTP SERVER"
smtpPort="25"
smtpAuthentication="None"
enableSsl="false"
fr...
Cookhouse asked 23/1, 2017 at 6:35
5
Solved
We are currently use azure scale set (many VMs on one source group with load balance and one availability set), we used to use NLog to log our web app action and errors, but now we asked/needs to u...
Atony asked 1/4, 2018 at 6:30
2
Solved
Now i am doing like this
LogManager.DisableLogging();
But this need to deploy my code again, how can I disable loggin from nlog configuration file.
Admiral asked 18/6, 2015 at 10:42
3
Solved
I added NLog to my project. Following the instructions I created NLog.config.
<?xml version="1.0" ?>
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
xmlns:xsi="http://www.w3.o...
Locution asked 13/1, 2012 at 11:53
5
Solved
My NLog targets is like this:
<targets>
<target xsi:type="Console" name="console"
layout="${longdate}|${level}|${message}" />
<target xsi:type="File" name="ErrorLog" fileName="$...
Grooms asked 4/1, 2010 at 15:25
© 2022 - 2024 — McMap. All rights reserved.