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
2 answers

Static Variables in WCF application hosted in IIS using NLOG

I'm confused by a recent change in the behavior of my WCF IIS application. A week ago, I was able to make a request to my service to a simple "Health" function that incremented a static variable using Interlocked.Increment and returned it. Now, I…
argyle
  • 1,319
  • 2
  • 14
  • 28
1
vote
2 answers

Log to a channel in Microsoft Teams with NLog

Objective Log the errors to Microsoft Teams with NLog from a console program. Issue Was able to log to the console, but not to Teams Code Config:
Quentin
  • 1,310
  • 18
  • 30
1
vote
1 answer

FileLoadException when using NLog

I'm developing API where I use NLog for logging incoming requests and their responses. Occasionally I'm getting following error on my server Application: w3wp.exe Framework Version: v4.0.30319 Description: The process was terminated due to an…
Václav Holuša
  • 311
  • 3
  • 14
1
vote
3 answers

Logging To Logentries via Nlog in an Azure Function

Has anyone had any luck getting their azure function to write to Logentries via nLog? Haven't been able to find any samples or docs online. Closest thing I could find was this example but doesn't take into account…
mariob_452
  • 103
  • 1
  • 1
  • 7
1
vote
1 answer

Intercepting log messages in nlog

We have a need to intercept the entries that nlog is writing to disk so that any URLs/IP addresses and similar security-sensitive information can be obfuscated or somehow encoded. For example, if any URL that is logged it should be converted from…
kgpai
  • 15
  • 4
1
vote
1 answer

(SEH)Exception initializing Nlog

I get the error at the end when I try to start a project I'm working on from Visual Studio. It worked fine until a few hours ago. After some minor unrelated changes it stopped working when starting from Visual Studio. It works fine when run from…
wuha24
  • 63
  • 1
  • 5
1
vote
1 answer

NLog: Adding Parameters at Action level for Asp.Net Core

Hi I am using Nlog according to this and I created a custom layout in addition. In my Action I want to pass parameters to the Ilogger that i can use in my custom layout. In my controller action i have var theEvent = new…
flexxxit
  • 2,440
  • 5
  • 42
  • 69
1
vote
2 answers

Nlog suddenly stopped creating log files on Linux, but it works on windows

My application is pointing to .net core framework 1.1.1. I have added NLog to my project. NLog - 5.0.0-beta05 NLog.Config - 4.3.9 NLog.Extensions.Logging - 1.0.0-rtm-beta1 My NLog config file is as follows:
Purnima Naik
  • 2,393
  • 5
  • 17
  • 25
1
vote
1 answer

NLog Getting Started Tutorial ILogger not found

I'm trying out logging for the first time and following the tutorial for NLog found at https://github.com/NLog/NLog.Web/wiki/Getting-started-with-ASP.NET-Core-(project.json) however when I get to step 4 where the logs are being written I get a…
BryanP
  • 330
  • 1
  • 5
  • 15
1
vote
1 answer

Use Nlog to log context info of Asp.Net Web API

I've two separate tables to log user activity and errors in asp.net web Api. Here's my Activity Log table: To store the Log information in the table, Here's the Nlog.config setting.
Pavan Kumar
  • 85
  • 11
1
vote
1 answer

NLog doesnt work on Linux

I have asp.net core 1.1 app, which is running on Ubuntu 16.04. Logging is configured using NLog: loggerFactory.AddNLog(); loggerFactory.ConfigureNLog("nlog.config"); app.AddNLogWeb(); On my dev Windows system everything is working fine:…
Seekeer
  • 1,344
  • 2
  • 18
  • 31
1
vote
2 answers

NLog for ASP.NET website doesn't log

I created simple ASP.NET web-site, added NLog, but it doesn't create any log file, neither throws any exceptions. I tried troubleshoot, but it doesn't help https://github.com/NLog/NLog/wiki/Logging-troubleshooting my web.config
ihorko
  • 6,855
  • 25
  • 77
  • 116
1
vote
1 answer

Mail sending with NLog in .NET Core 1.0

I am using NLog library for logging errors and need to send mail for that. Its working with MVC but in netcoreapp1.1 its giving error. I am using
sagar43
  • 3,341
  • 3
  • 29
  • 49
1
vote
2 answers

How to log using vertical fields instead of horizontal columns?

I'm using the NLog.EventLog target, and using the API I wish to log an event in vertical-field format. It might look something like this: Method: ServiceBase.Manager.StartService() Message: The service started successfully. Result: The service is…
InteXX
  • 6,135
  • 6
  • 43
  • 80
1
vote
2 answers

NLog: How to determine if a named logger was not found in config

Let's say I have this partial configuration, with NLog: ..and then I write this code: var configuredLogger =…
badlife
  • 23
  • 4