nlog

How do you log errors (Exceptions) in your ASP.NET apps?

Hi, I'm looking for the best way to log errors in an ASP.NET application. I want to be able to receive emails when errors occurs in my application, with detailed information about the Exception and the current Request. In my company we used to have our own ErrorMailer, catching everything in the Global.asax Application_Error. It was "Ok...

Preferred logging infrastructure for .Net

What is your preferred logging infrastructure for .Net - NLog, log4net, other? Please, specify why you would use one vs. another (pros and cons). Edit: I find it really difficult to "accept" an answer, as there is no enough data to compare. I.e. favoring one of the possibilities, w/o specifying features, that others lack, or are better ...

Strange VB6 build problems (related to nlog)

This I think is related to my use of the nlog C++ API (and my question on the nlog forum is here); the purpose of my asking this question here is to get a wider audience to my problem and perhaps to also get some more general ideas behind the VB6 IDE's failure to build in my particular scenario. Briefly, the problem that I am having is ...

Logging Library for .NET Compact Framework?

Any good logging libraries that support .NET compact framework? ...

How can i output NLog stuff to the vs2008 'output' window?

Hi folks, I'm using NLog to log my stuff. I'm trying to send the output to the console (or colouredconsole) ... which i'm hoping would goto the visual studio 'OUTPUT' window for any ASP.NET web site/app/mvc app. It's not. If i change the target to 'file' then it works for sure. So - can NLog output to the 'output' window for web...

Visual Studio - How to remove a reference in Release mode

Hi, I'm developing a library for use in other apps and this library has lots of debugging and logging statements thanks to NLog. Is it possible to exclude the reference to NLog.dll when I switch to release mode? Cheers, ...

Using LinqToSql with NLog

Hi I'm writing an .NET 3.5 web application that is using LinqToSql for the basic database stuff. I'd like to use the nLog library for logging. This library can log to a database using good ol' fashioned stored procedures (not that there is anything wrong with that..) but I'd like to use the LingToSql DataContext to log to the database ...

forward from log4net to NLog

In my current project I'm using two libraries where one is using log4net and the other NLog for its logging. I'm personally prefer NLog so it is used in my application as well. I'm not knowing much about log4net so I'm asking what would be the best way to programmatically forward all the messages from log4net to NLog. There is a post a...

How to get stack trace information for logging in production when using the GAC

I would like to get stack trace (file name and line number) information for logging exceptions etc. in a production environment. The DLLs are installed in the GAC. Is there any way to do this? This article says about putting PDB files in the GAC: You can spot these easily because they will say you need to copy the debug symbols (.pd...

log4net vs. Nlog

Anyone have experience for both? How do they stack up against each other? We are planning on using one of them for logging in an enterprise application. References: log4net nlog EDIT: We have no existing dependencies to either nlog or log4net. ...

Why won't my windows service write to my log file?

I have a windows service and use nlog for logging. Everything works fine when I run from the visual studio ide. The log file updates with no issues. When I install the service, the service runs fine but the log file never updates. I am running under LOCAL SERVICE if that helps. Yes, I have created the logs directory under my applica...

NLog ASP.Net viewer

I am using nLog in a large financial application, but frequently need to bring up the logs of the last hour while the software is running and filter on specific loggers/levels. I want to log everything to SQL, and use an asp.net viewer. Do any such project exist? Are there some good example sites for this? ...

How to use NLog/Log4Net to automate database change tracking?

I am aware of many table auditing methods. Some are trigger based and require triggers on each table to be audited. SOme have limitation based on column datatype. How can I use a logging framework like NLog or Log4Net. I want my log(in a table) to answer question " Who updated this column of this table from val0 to val1 at this time?" I...

NLog does not write to file on Vista deployment

I am using NLog for the first time on a project. I want to log to a file, so I added a target writing to fileName="${basedir}/logs/${shortdate}.log". This creates/appends log info to a file in MyApplicationFolder/Logs/2009-06-08.log. Logging works fine on a Windows XP machine, in debug mode, and when I deploy using my msi installer. Howe...

How to get NLog to write to database

Hi, I'm trying to get NLog to log to my database log table but to no avail. I'm sure my connection string is correct because it's the same used elsewhere in my web.config. Writing out to a file works fine, so I know it's not just NLog, but must be something I'm doing wrong. Below is my NLog configuration: <!-- NLOG CONFIGURATION -->...

use Nlog:config twice in web.config

hey, i use nlog in my project.my web.config like this: ... Two identical connectstring!my question is how to keep only one connectstring. thanks! ...

use Nlog:config twice in web.config

hey, i use nlog in my project.my web.config like this: <connectionStrings> <add name="SQL_ConnStr" connectionString="Initial Catalog=ConfigDB;Provider=SQLOLEDB; Data Source=mysqlserver; User ID=sa; Password=sa; Persist Security Info=True;"/> </connectionStrings> ... <nlog> <targets> <target name="database" type="Database" dbProvider...

Postsharp and NLog, general design question

Hi, This is what i intend to do: I want to write a Aspect oriented NLog specific onmethodexecutionaspect class. But i still want to ensure that the calling code is attributed using a general attribute class which will internally load the NLog or TraceX etc specific implementation of methodexecutionaspect depending on what is specified...

NLog vs. Log4Net

OK, no worries... i found some posts that answers it well. I could not delete the post, so i am editing it. ...

Deploying NLog with a ClickOnce application

Users are not able to install a ClickOnce application. The error is: "File NLog.dll is not a valid Portable Executable (PE) file." It works fine on my machine, but I have nLog installed. That's not possible for client machines. Any ideas how to get this to work? ...