Questions tagged [nlog]

NLog is a free logging platform for .NET

NLog is a logging platform for .NET with support for structured logging. NLog enables easy routing and filtering of output to various targets.

Resources

2784 questions
1
vote
1 answer

What is the purpose of PerfCounter target in NLog

The documentation is quite terse. Is the purpose to benchmark the logging itself, or to benchmark my code? Do I need to put the PERF target inside another target? Or it is the other way around? Can someone give an example of how I should use it?
John Henckel
  • 10,274
  • 3
  • 79
  • 79
1
vote
1 answer

Logging With NLog In Azure WebJobs

I've got an NLog configuration which works just fine for my web app (ASP.NET Core). Now I'm trying to add NLog to my webjobs, but I can't figure out how to do it. In Program.cs within the webjob project, I need to somehow inject IHostingEnvironment…
Steviebob
  • 1,705
  • 2
  • 23
  • 36
1
vote
2 answers

Cant get NLog to work

So I set up NLog config file supposedly correct (did the same thing i did on a working project) however in this project it fails for some reason the database Logs table is empty. Can somone tell me what may cause the issue? Heres the…
Raf
  • 85
  • 1
  • 1
  • 8
1
vote
1 answer

Nlog Save log file based on variable

I have dynamically created game instances that each create a GUID on initialization, I want each of these instances to log in their own logfile. However right now it only logs to the latest instance initialized Game Instance: public class…
user1725266
  • 456
  • 1
  • 4
  • 22
1
vote
0 answers

Extending NLog to write to a network drive doesn't do anything

I'm trying to store my logs to a drive in the network. I wrote an nlog extension module: module NLogExtension open System.Text open NLog open NLog.LayoutRenderers open NLog.Config open System.IO [] type…
Kafo
  • 3,568
  • 1
  • 12
  • 19
1
vote
1 answer

NLog with AzureTableStorage

Trying to insert logs into Azure table storage, while using the extension of NLog.Extensions.AzureTableStorage in Nlog.config file , i am getting error under target type for azure table storage. Error : - This is invalid xsi:type…
user1555245
  • 125
  • 2
  • 3
  • 12
1
vote
1 answer

NLog Live Viewing/Monitoring

I am using NLog as my logging framework. I envisage I will have logs coming in from multiple sources (20, 30+) I want to be able to live monitor at will. What Viewers (commercial or free) are the best to use? I am currently rolling over my days and…
The_Chud
  • 991
  • 1
  • 11
  • 24
1
vote
0 answers

merge or combine App.config with Nlog.config Log4View

I'm building a winforms application, and am using NLog as my logging framework. My configuration for NLog resides in its own file, NLog.config and this is in the main program directory. So App.config and NLog.config sit in the same directory. The…
The_Chud
  • 991
  • 1
  • 11
  • 24
1
vote
1 answer

NLog get messages in C#

I am recently using Nlog in an ASP.Net project for a client with good success. I need to connect to an existing application that has its own event log management and provide them with a copy of my log information. Is there any way to get the strings…
Miguel Febres
  • 2,153
  • 2
  • 21
  • 31
1
vote
1 answer

Generic Logging and Specific Logging (using NLOG), Duplication of Logging

I am trying to create 2 loggers (using NLog) First logger logs all the desired item to log in the solution The other one traces specific items (I do it to keep things clean and focused, and only run trace here) Below is the configuration
Abhishek Kumar
  • 342
  • 5
  • 22
1
vote
2 answers

Associate multiple NLog events with a single ASP.NET Request

I'd like to use a logging system to trace a large web application. So far I've settled on NLog, for it's ease of configuration and API. When tracing is enabled, I'm expecting to see lots of logging for various users. Is there a way to associate the…
vdboor
  • 21,914
  • 12
  • 83
  • 96
1
vote
2 answers

NLog - FallbackGroup not working as expected

I am using Nlog's FallbackGroup wrapper to setup failover logging. In case my first target - "Network" logger fails/errors out, it should log to second target/fallback target "EventLog". But while I am running my console app, I could see that it is…
Sujith
  • 1,604
  • 9
  • 16
1
vote
1 answer

NLog is not reading my app.config settings in a Console application

I am trying to do a little spike and I cannot get log file generated. This is my NLog configuration:
ferpega
  • 3,182
  • 7
  • 45
  • 65
1
vote
4 answers

NLog create new log file per instance of class

I have a project which already uses NLog . The application creates an instance of a given class passes an instance of ILogger to it and then calls an "execute" method within the instance - The system is multi threaded and can have up to 200 of these…
5NRF
  • 401
  • 3
  • 12
1
vote
1 answer

Nlog with Pomelo.EntityFrameworkCore.MySql

I am working on NLog with Pomelo.EntityFrameworkCore.MySql, Based on the document, I know Pomelo based on MySqlConnector, but I don't know what's the value of dbProvider of the target in file nlog.config.
SheldonLou
  • 169
  • 1
  • 11