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

How to use NLog in Xamarin Android

I want to use NLog in my Xamarin.Droid project. I installed NLog.Config and dependencies and move NLog.config and NLog.xsd manually to Assets folder and change NLog.config build action to AndroidAsset. As you can see in Load automatically…
sorosh_sabz
  • 2,356
  • 2
  • 32
  • 53
1
vote
1 answer

How to properly format System.Data.SqlClient.SqlException with NLog

When I log a SqlException with NLog, many of its important properties such as Stored procedure name are missing from the formatted exception. What would be the most efficient way to log a SqlException with NLog?
Allan Xu
  • 7,998
  • 11
  • 51
  • 122
1
vote
3 answers

NHibernate with NLog or Log4Net or something else?

I want to use NHibernate in my project, and it comes with log4net by default. In my opinion, it would be a wiser choice to go for Nlog as it still gets updates, log4net on the other hand is completely outdated. Is there a best choice because I don't…
Kennethvr
  • 2,660
  • 5
  • 26
  • 35
1
vote
1 answer

Nlog and how to present credentials in order to open a remote log file

Is there a way to enter Active Directory credential when targeting a file? On my company, there are multiple applications writing to a single log file with info like start, success or error. I'd like create a new target on my nlog.config file but…
m0dest0
  • 849
  • 4
  • 17
  • 36
1
vote
1 answer

NLog not Logging in Simple App

I am trying to implement a simple log using Nlog 1.0, using the following code Dim _logger = LogManager.GetCurrentClassLogger() _logger.Debug("Iain") And the following NLog.config.
Iain
  • 6,392
  • 2
  • 30
  • 50
1
vote
1 answer

In NLog, is it possible to use layouts to define the log level?

I would like to use Layouts in NLog to be able to change the minimum log level using an external variable :
tigrou
  • 4,236
  • 5
  • 33
  • 59
1
vote
0 answers

How to create thread specific memory appender in NLog

I am pasting my code snippet using log4Net, -Just in brief: I am creating a new rolling appender and a memory appender and attaching them to a logger in logger repository for every new thread. Whatever I write in rolling appender, automatically got…
vipin
  • 21
  • 4
1
vote
2 answers

NLog Separate Memory Logger for each thread

I am using NLog with Common Logging Please find my complete code snippets I have mentioned the current output and expected output too I want separate memory logger per thread, they should not interact with each other. Config
vipin
  • 21
  • 4
1
vote
1 answer

Logging to multiple folders

I have a windows service that accepts web requests to trigger a long running async task. I want each of the task to output the logs to different directories (the name of which is determined by the request id and user who triggered the job). Inside…
Narayana
  • 2,654
  • 3
  • 32
  • 32
1
vote
2 answers

How to replace NLog Logger with a new instance of Logger?

So, just started using NLog. I'm doing a programmatic implementation where I'm trying to setup a class that I can import into any project. The class has two methods: CreateLogger() and GenerateLog(). Here is the class in its entirety: using…
breusshe
  • 59
  • 1
  • 15
1
vote
2 answers

Configuring NLog programmatically

I have a working configure of NLog. I use NLog.config
user3272018
  • 2,309
  • 5
  • 26
  • 48
1
vote
2 answers

Application insight NLog target

I have console application from which I want to send custom events to my Application Insight. I want to use Application Insight NLog target (https://www.nuget.org/packages/Microsoft.ApplicationInsights.NLogTarget/) but it's not working. I tried to…
user2086174
  • 195
  • 1
  • 3
  • 12
1
vote
1 answer

nlog old archive files aren't deleted: archiveNumbering=Date,archiveOldFileOnStartup,maxArchiveFiles

NLog Version 4.3.6 This target creates a logfile in the log directory in the following format Trace_2016-08-03.log the logfile is moved on startup to the archive directory with a name like Trace_2016-08-03_11h33m32s_743ms.log however old archive…
FreeG
  • 95
  • 1
  • 8
1
vote
1 answer

Nlog - database performance difference between target is offline and target not exists

I was looking on internet about difference about database as target is offline, but exists and target not exists. I have application that using NLog and I find out bug when my db target not exists then my performance is down from 100+ transactions…
J.Vesely
  • 13
  • 4
1
vote
1 answer

Move archive files to FTP server using NLog

I want to move archive files to a location at FTP server.The archive files will be generated using NLog.How can I move files to a remote server using NLog.Is it possible?
Kesiya Abraham
  • 753
  • 3
  • 10
  • 24
1 2 3
99
100