Click here to Skip to main content
15,886,422 members
Everything / Nlog

Nlog

nlog

Great Reads

by Ondra Morský
Implement NLog logging with SignalR
by Zoltán Zörgő
Presentation of a simple library supporting use of NLog with LinqPad
by Ivan Yakimov
In Confirmit, we use NLog library for logging in .NET applications. Although there is a documentation for this library, I found it hard to understand how the loggers work. In this article, I’ll try to explain, how rules and filters are used by NLog.
by Sebastian Solnica
NLog LayoutRenderer for Assembly Version

Latest Articles

by Sreejith Gopinathan
Error logging in ASP.NET Core Application with NLog
by Ivan Yakimov
In Confirmit, we use NLog library for logging in .NET applications. Although there is a documentation for this library, I found it hard to understand how the loggers work. In this article, I’ll try to explain, how rules and filters are used by NLog.
by Saineshwar Bageri
In this article, we are going to learn how to implement the best Logging libraries available in the market for an ASP.NET MVC application.
by Zoltán Zörgő
Presentation of a simple library supporting use of NLog with LinqPad

All Articles

Sort by Score

Nlog 

14 Apr 2014 by Ondra Morský
Implement NLog logging with SignalR
7 Aug 2018 by Zoltán Zörgő
Presentation of a simple library supporting use of NLog with LinqPad
6 May 2019 by Ivan Yakimov
In Confirmit, we use NLog library for logging in .NET applications. Although there is a documentation for this library, I found it hard to understand how the loggers work. In this article, I’ll try to explain, how rules and filters are used by NLog.
22 Nov 2012 by Sebastian Solnica
NLog LayoutRenderer for Assembly Version
8 Dec 2013 by thatraja
I think it's time to update this again soon.NET Code Conversion - Convert your code[^]
9 Apr 2016 by Southmountain
A discussion on how to upload NLog configuration into version control system for beginners. Two configurations are given here.
18 May 2017 by Rolf Kristensen
You should remove "${longdate}" from the archiveFileName. The place-holder "{##}" will automatically insert date and sequence-number. Instead use the File-Target parameter archiveDateFormat to control the date-layout used inside the place-holder.
13 Jun 2017 by Patrick Skelton
This turned out to be the Gamut File Viewer (www.gamutsoftware.com), which I have just started using (that should have been my clue). Reading the docs, it seems it has the functionality to clear the log file, which probably means it keeps a permanent lock on the file. I am surprised that I was...
12 Sep 2017 by Patrick Skelton
I have read the docs on this, but I can't get an NLog logger to contain only lines that contain a fixed substring. I am using the code below. The file is written but contains all logging output, just the same as another log I have that has no filter. Can anyone please tell me what I am doing...
12 Sep 2017 by Patrick Skelton
The answer to this is (as I suspected) annoyingly obvious. The clue is in the name. These things are called 'filters', so they don't say what should be written to the log; they say what should not be written to the log. So, it works if I change the filter to:
12 Aug 2020 by Sreejith Gopinathan
Error logging in ASP.NET Core Application with NLog
8 Dec 2013 by Mehdi Gholam
Try this site : http://www.carlosag.net/tools/codetranslator/[^]
15 Apr 2015 by Mithun P
Hi,I have used log4net before where there was no need to write any code just do some configuration in config file to log the errors. Now i want to do same using Nlog but couldnt achieve this . Can some show me sample how to log using Nlog. I tried below code in config file ...
7 May 2015 by Venkata Durga Rao
static void Main(string[] args) { WebServiceTarget target = new WebServiceTarget(); target.Url = new System.Uri("http://localhost:52427/api/audit"); target.Protocol = WebServiceProtocol.HttpPost; target.Parameters.Add(new...
13 Jul 2015 by zhshqzyc
I am using NLOG to log the information. There is a property UserStackFrame.I used the code.protected override void Write(LogEventInfo loggingEvent) { try { var renderedEvent = Layout.Render(loggingEvent); var...
15 Jul 2015 by Hector Menchaca
Hello,In this case and as per LogEventInfo documentation:UserStackFrame get the stack frame of the method that did the logging.You need to set the Stack Trace using setStackTrace method of the LogEventInfo class. And just to be sure maybe after do the validation on userStackFrame...
29 Sep 2015 by Member 11955380
I have a WCF Service in which Nlog is used for logging. The requirement is to enable/disable Nlog logging programmatically. For doing this I have used EnableLogging() and DisableLogging() functions. The problem which I am facing is, state of logging is getting changed only on app pool recycle....
26 Nov 2015 by Ksh_Sr
I am making a logger and wish to use the nLog as one of the log providers for the application. I also intend to configure nLog according to Microsoft.Extension.Logging rc1- final release in Asp.Net vNext application.i tried googling but it wasnt so fruitful.Any help or guidance is deeply...
28 Nov 2015 by Ksh_Sr
Refer to the article http://www.codeproject.com/Articles/1005242/Using-nLog-with-asp-net-vNext[^]
26 Jun 2016 by Bastien Vandamme
Hello,I just herited of a very bad Web API code in C#. I need to improve it but I don't know where to start. There are plenty f classes and the code is a nightmare.I'm also sure that part of this code is never used. I would like to count the number of time each request is called and what...
18 May 2017 by Patrick Skelton
I have the NLog configuration below:
13 Jun 2017 by Patrick Skelton
I have been using NLog in a WPF application for some months. I am developing in Visual Studio 2015 on Windows 10. I write from my application using NLog into \bin\Debug\Logs. Suddenly I find I do not have permission to delete log files in this directory. And this obviously propagates up the...
21 May 2019 by arvindcis
I want to save my Error logs file on Azure Blob Storage. I am able to store these file on FTP Folder by NLog.config. What I am doing wrong with my code. Even Log file creating successfully on Local Machine. Thanks in Advance What I have tried: My Nlog.config file ...
21 May 2019 by Gerry Schmitz
NuGet Gallery | NLog.AzureAppendBlob.Standard 1.0.3[^]
20 Oct 2021 by mohamad_ali
hi , i used nlog to get log in xamarinform but the nlog not loged any thing whats problem? What I have tried: nlog.config:
21 Oct 2021 by Rolf Kristensen
Your logging rule for the file-target is only enabled for warn-/error-logging. Maybe update your main-method to log an Error-event. Else you will only get output to console. Also make sure that Nlog.config is loaded correctly from assembly...
11 Apr 2022 by Patrice T
Quote: If the input size n is 10^9, then it should take 10^9 * log(10^9) / 10^9 = 9 second, right? No ! You don't calculate runtime from Big O notation, at least not by itself. The Big O notation tells you the category complexity of an...
11 Apr 2022 by CPallini
The big O doesn't give the exact time of execution. See, for instance Big O notation - Wikipedia[^] (Properties sections, multiplication by a constant).
11 Apr 2022 by OriginalGriff
To add to what the others say, you can't equate clock cycles directly with execution time anyway - some machine operations take n cycles to execute, others may be n * 2. To add to that, modern processors are pipelined - so some instructions may...
11 Apr 2022 by Greg Utas
30 seconds is about right if it's log2(n). log2(1000) ~= 10. EDIT: O(n log(n)) algorithms often recursively divide the problem in half, solve each part separately, and then combine the solutions. This is why log2 is usually implied. Mergesort is...
11 Apr 2022 by Luc Pattyn
the big O notation only tells you how the execution time will change when the "size" of the problem is changed, it does not provide an actual estimate for a specific case. In other words, there is an unknown factor, so for example O(n2) could...
11 Apr 2022 by Hoang Minh Quang FX15045
I'm learning a Coursera course about time complexity. I encounter this in a video and I think something is wrong. "So suppose that we have an algorithm whose runtime is roughly proportional to n and we want it to run it on a machine that runs at...
22 Feb 2019 by Saineshwar Bageri
In this article, we are going to learn how to implement the best Logging libraries available in the market for an ASP.NET MVC application.
6 Oct 2014 by _Noctis_
This will let you start logging quickly with VS2013 and NLog.
1 Apr 2017 by Daniele Fontani, keggyy
In this article, we explain how to build a simple and easy to use log platform, keeping in mind performance ad security.
11 Nov 2015 by _Noctis_
This will let you start logging quickly with VS2015 and NLog 4.2.
15 Jun 2014 by _Noctis_
This will set you logging from your NLog to your Growl in no time.
18 Apr 2014 by Sebastian Solnica
LowLevelDesign.NLog.Ext and ETW targets for NLog
29 Nov 2015 by Ksh_Sr
This tip helps you implement the nLog in conjunction with Microsoft.Extension.Logging framework in ASP.NET vNext.
8 Dec 2013 by Kats2512
Hi,I need to add logging to a console application I created recently and I have been asked to use NLOG. I have mainly come across C# examples and hardly understand C#. If someone could please provide me with examples of vb.net code it would make a difference to me :) thanks
8 Jun 2015 by zhshqzyc
We can just add the prefix to it.
17 Jan 2024 by Mickey P
Big O notation talks about generalizations. its similar to if you were doing size estimates in lets say economics: such that 1000 and 750 would be both rounded to 1000 and what is interesting is 10K is not in the same ballpark of 100K but 13K is...
13 May 2015 by zhshqzyc
I want to put the log file in a given path. It is in app.config in a class library project, say I want to save the log in "C:\Test\log.txt" or a network path. How to do it?Currently I have