Re: nlog - not creating log files when used with web applications - IT WORKED - NEED ONE MORE ADVISE

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: nlog - not creating log files when used with web applications - IT WORKED - NEED ONE MORE ADVISE

Jarek Kowalski
Administrator
We've been using NLog extensively for some time in our products and it works
great.
As for the bugs, every software has them, NLog is not different (just like
log4net, EL and others). I'm not aware of any bug that would disturb logging
in any way. If have throwExceptions="false" you'll get no exceptions in your
app because NLog would swallow them.

1.0 will be released soon (I hope this month).

In the meantime you may try the more recent snapshots at

http://www.nlog-project.org/snapshots/

There's a new tutorial that will be in place for v1.0:

http://www.nlog-project.org/snapshots/20060528/web/tutorial.html

(the snapshots are not recommended for production yet, but they add some
features which you might like, such as Visual Studio.NET integration)

Jarek
----- Original Message -----
From: "Lakshmi Saripella" <[hidden email]>
To: "Jaroslaw Kowalski" <[hidden email]>
Cc: <[hidden email]>
Sent: Thursday, June 01, 2006 8:10 AM
Subject: Re: nlog - not creating log files when used with web applications -
IT WORKED - NEED ONE MORE ADVISE


> Hi!
>
> Thanks a ton. It worked in all the ways i.e. creation of
> A> static named log files - TestLog.txt, logs/TestLog.txt,
> B> dynamic named log files - logs/yyyy-mm-dd_TestLog.txt,
> logs/yyyy-mm-dd_level_TestLog.log etc
>
> on following exactly what has been said by you.
>
> Now, having got the log file created with respective contents in required
> ways,
> I'm more interested in knowing the stability of the product in production
> code.
>
> I suppose it is a matured product and will not have any issues when used
> extensively in production code.
> I also assume that it has been used in most of the medium to huge .net
> projects, as replacement to Log4Net.
>
> We can  not afford (in fact, none) bugs being thrown or unstable behaviour
> of the product, when used in
> production code Hope you are getting me in right sense.
>
> Pls. advice.
>
> Sincerely,
>
> Lakshmi Saripella
>
>
>
> From: Jaroslaw Kowalski
> To: Lakshmi Saripella
> Cc: [hidden email]
> Sent: Thursday, June 01, 2006 9:46 AM
> Subject: Re: nlog - not creating log files when used with web applications
>
>
> One more thing, you should remove the programmatic configuration code from
> Global.asax.cs as this overrides the configuration file.
>
> Jarek
>
> ----- Original Message -----
> From: "Jaroslaw Kowalski" <[hidden email]>
> To: "Lakshmi Saripella" <[hidden email]>
> Sent: Thursday, June 01, 2006 9:39 AM
> Subject: Re: nlog - not creating log files when used with web applications
>
>
>> The contents of web.nlog are malformed (it's not valid XML):
>>
>> Should be:
>>
>> <nlog throwExceptions="true">
>>   <targets>
>>     <target name="console" type="Console"
>> layout="${longdate}|${logger}|${level}|${message}" />
>>     <target name="file" type="File" filename="${basedir}/testlog.txt" />
>>   </targets>
>>   <rules>
>>     <logger name="*" minlevel="Debug" appendTo="console,file" />
>>   </rules>
>> </nlog>
>>
>> (no <configuration> nor <configSections> are necessary here). One more
>> thing. You don't have access to the console while in ASP.NET application,
>> you should remove the console target.
>>
>> Jarek
>>
>> ----- Original Message -----
>> From: Lakshmi Saripella
>> To: Jaroslaw Kowalski
>> Cc: [hidden email]
>> Sent: Thursday, June 01, 2006 5:51 AM
>> Subject: Re: nlog - not creating log files when used with web
>> applications
>>
>>
>> Hi!
>>
>> Thanks for info. It did not throw any errors.
>>
>> I'm trying to execute the sample application (ASPNetTraceTest), which
>> I've
>> got on downloading nlog-0.95-bin.zip (binary version), by configuring the
>> web.nlog file, in order to log messages to .log files.
>>
>> Trace.axd portion worked well. I'm more keen in having .log files with
>> various names (viz., 20060601AppLog.log in logs folder etc.) as mentioned
> in
>> NLog documentation
>>
>> Find attached my web application, with all the config files and rest all.
>>
>> Pls. advice me asap. I need to put this in-place in our project at the
>> earliest.
>>
>>
>> Thanks,
>>
>> Lakshmi Saripella
>>
>> ----- Original Message -----
>> From: Jaroslaw Kowalski
>> To: Lakshmi Saripella
>> Sent: Wednesday, May 31, 2006 11:07 PM
>> Subject: Re: nlog - not creating log files when used with web
>> applications
>>
>>
>> Please add <nlog throwExceptions="true" /> and let me know if you get any
>> errors.
>>
>> Jarek
>> ----- Original Message -----
>> From: Lakshmi Saripella
>> To: [hidden email]
>> Sent: Wednesday, May 31, 2006 6:16 PM
>> Subject: Fw: nlog - not creating log files when used with web
>> applications
>>
>>
>>
>> ----- Original Message -----
>> From: Lakshmi Saripella
>> To: [hidden email]
>> Cc: [hidden email]
>> Sent: Wednesday, May 31, 2006 9:42 PM
>> Subject: nlog - not creating log files when used with web applications
>>
>>
>> Hi!
>>
>> I'm trying to use NLog with my .net web application and followed all the
>> given instructions. However, I do not get to see the .log files getting
>> created when applying with .net web application. In contrast the log
>> files
>> are getting created when applied with windows application.
>>
>> Any input is highly appreciating.
>>
>> Thanks in advance
>>
>> Lakshmi Saripella
>>
>>
>



-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
Nlog-list mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/nlog-list
NLog Blog
Reply | Threaded
Open this post in threaded view
|

Re: nlog - not creating log files when used with web applications - IT WORKED - NEED ONE MORE ADVISE

Jarek Kowalski
Administrator
v0.95 and future versions are compatible with .NET 2.0. There's just one
NLog.dll that works with all platforms.
v1.0 will have separate builds for all supported frameworks. Preview is
already available at

http://www.nlog-project.org/snapshots/

NLog is designed to have minimal impact on application performance.

Assuming that your logging statements are ineffective (such as
logger.Debug("message") but you've set the minlevel to "Info"), NLog's
performance impact is minimal (equal to the cost of a single boolean
comparison). Actual logging does take some CPU and IO time, but that's not
avoidable. NLog has asynchronous logging that does the logging in a separate
thread so your app threads finish more quickly.

I'll write more about performance soon.

Jarek

----- Original Message -----
From: "Lakshmi Saripella" <[hidden email]>
To: "Jaroslaw Kowalski" <[hidden email]>
Cc: <[hidden email]>
Sent: Thursday, June 01, 2006 8:39 AM
Subject: Re: nlog - not creating log files when used with web applications -
IT WORKED - NEED ONE MORE ADVISE


> Thanks again. I've got few more queries, as mentioned below. As I'm the
> beginner of NLog, keen to get few things clarified from experts, before
> being implemented in our projects
>
>>> How about NLog compatibility to .NET 2.0?
>>> Having nlog in-place in .net application, will it any way impact the
> application performance (in terms of execution speed)?
>>> Where can I have comparision of its functionality in terms of
> effectiveness, performance, and features against its counterparts
> (Log4Net,
> EL   etc.)?
>
>
> Awaiting your reply.
>
> Sincerely,
>
> Lakshmi Saripella
>
>
> ----- Original Message -----
> From: "Jaroslaw Kowalski" <[hidden email]>
> To: "Lakshmi Saripella" <[hidden email]>
> Cc: <[hidden email]>
> Sent: Thursday, June 01, 2006 11:45 AM
> Subject: Re: nlog - not creating log files when used with web
> applications -
> IT WORKED - NEED ONE MORE ADVISE
>
>
>> We've been using NLog extensively for some time in our products and it
> works
>> great.
>> As for the bugs, every software has them, NLog is not different (just
>> like
>> log4net, EL and others). I'm not aware of any bug that would disturb
> logging
>> in any way. If have throwExceptions="false" you'll get no exceptions in
> your
>> app because NLog would swallow them.
>>
>> 1.0 will be released soon (I hope this month).
>>
>> In the meantime you may try the more recent snapshots at
>>
>> http://www.nlog-project.org/snapshots/
>>
>> There's a new tutorial that will be in place for v1.0:
>>
>> http://www.nlog-project.org/snapshots/20060528/web/tutorial.html
>>
>> (the snapshots are not recommended for production yet, but they add some
>> features which you might like, such as Visual Studio.NET integration)
>>
>> Jarek
>> ----- Original Message -----
>> From: "Lakshmi Saripella" <[hidden email]>
>> To: "Jaroslaw Kowalski" <[hidden email]>
>> Cc: <[hidden email]>
>> Sent: Thursday, June 01, 2006 8:10 AM
>> Subject: Re: nlog - not creating log files when used with web
> applications -
>> IT WORKED - NEED ONE MORE ADVISE
>>
>>
>> > Hi!
>> >
>> > Thanks a ton. It worked in all the ways i.e. creation of
>> > A> static named log files - TestLog.txt, logs/TestLog.txt,
>> > B> dynamic named log files - logs/yyyy-mm-dd_TestLog.txt,
>> > logs/yyyy-mm-dd_level_TestLog.log etc
>> >
>> > on following exactly what has been said by you.
>> >
>> > Now, having got the log file created with respective contents in
> required
>> > ways,
>> > I'm more interested in knowing the stability of the product in
> production
>> > code.
>> >
>> > I suppose it is a matured product and will not have any issues when
>> > used
>> > extensively in production code.
>> > I also assume that it has been used in most of the medium to huge .net
>> > projects, as replacement to Log4Net.
>> >
>> > We can  not afford (in fact, none) bugs being thrown or unstable
> behaviour
>> > of the product, when used in
>> > production code Hope you are getting me in right sense.
>> >
>> > Pls. advice.
>> >
>> > Sincerely,
>> >
>> > Lakshmi Saripella
>> >
>> >
>> >
>> > From: Jaroslaw Kowalski
>> > To: Lakshmi Saripella
>> > Cc: [hidden email]
>> > Sent: Thursday, June 01, 2006 9:46 AM
>> > Subject: Re: nlog - not creating log files when used with web
> applications
>> >
>> >
>> > One more thing, you should remove the programmatic configuration code
> from
>> > Global.asax.cs as this overrides the configuration file.
>> >
>> > Jarek
>> >
>> > ----- Original Message -----
>> > From: "Jaroslaw Kowalski" <[hidden email]>
>> > To: "Lakshmi Saripella" <[hidden email]>
>> > Sent: Thursday, June 01, 2006 9:39 AM
>> > Subject: Re: nlog - not creating log files when used with web
> applications
>> >
>> >
>> >> The contents of web.nlog are malformed (it's not valid XML):
>> >>
>> >> Should be:
>> >>
>> >> <nlog throwExceptions="true">
>> >>   <targets>
>> >>     <target name="console" type="Console"
>> >> layout="${longdate}|${logger}|${level}|${message}" />
>> >>     <target name="file" type="File" filename="${basedir}/testlog.txt"
> />
>> >>   </targets>
>> >>   <rules>
>> >>     <logger name="*" minlevel="Debug" appendTo="console,file" />
>> >>   </rules>
>> >> </nlog>
>> >>
>> >> (no <configuration> nor <configSections> are necessary here). One more
>> >> thing. You don't have access to the console while in ASP.NET
> application,
>> >> you should remove the console target.
>> >>
>> >> Jarek
>> >>
>> >> ----- Original Message -----
>> >> From: Lakshmi Saripella
>> >> To: Jaroslaw Kowalski
>> >> Cc: [hidden email]
>> >> Sent: Thursday, June 01, 2006 5:51 AM
>> >> Subject: Re: nlog - not creating log files when used with web
>> >> applications
>> >>
>> >>
>> >> Hi!
>> >>
>> >> Thanks for info. It did not throw any errors.
>> >>
>> >> I'm trying to execute the sample application (ASPNetTraceTest), which
>> >> I've
>> >> got on downloading nlog-0.95-bin.zip (binary version), by configuring
> the
>> >> web.nlog file, in order to log messages to .log files.
>> >>
>> >> Trace.axd portion worked well. I'm more keen in having .log files with
>> >> various names (viz., 20060601AppLog.log in logs folder etc.) as
> mentioned
>> > in
>> >> NLog documentation
>> >>
>> >> Find attached my web application, with all the config files and rest
> all.
>> >>
>> >> Pls. advice me asap. I need to put this in-place in our project at the
>> >> earliest.
>> >>
>> >>
>> >> Thanks,
>> >>
>> >> Lakshmi Saripella
>> >>
>> >> ----- Original Message -----
>> >> From: Jaroslaw Kowalski
>> >> To: Lakshmi Saripella
>> >> Sent: Wednesday, May 31, 2006 11:07 PM
>> >> Subject: Re: nlog - not creating log files when used with web
>> >> applications
>> >>
>> >>
>> >> Please add <nlog throwExceptions="true" /> and let me know if you get
> any
>> >> errors.
>> >>
>> >> Jarek
>> >> ----- Original Message -----
>> >> From: Lakshmi Saripella
>> >> To: [hidden email]
>> >> Sent: Wednesday, May 31, 2006 6:16 PM
>> >> Subject: Fw: nlog - not creating log files when used with web
>> >> applications
>> >>
>> >>
>> >>
>> >> ----- Original Message -----
>> >> From: Lakshmi Saripella
>> >> To: [hidden email]
>> >> Cc: [hidden email]
>> >> Sent: Wednesday, May 31, 2006 9:42 PM
>> >> Subject: nlog - not creating log files when used with web applications
>> >>
>> >>
>> >> Hi!
>> >>
>> >> I'm trying to use NLog with my .net web application and followed all
> the
>> >> given instructions. However, I do not get to see the .log files
>> >> getting
>> >> created when applying with .net web application. In contrast the log
>> >> files
>> >> are getting created when applied with windows application.
>> >>
>> >> Any input is highly appreciating.
>> >>
>> >> Thanks in advance
>> >>
>> >> Lakshmi Saripella
>> >>
>> >>
>> >
>>
>>
>



-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
Nlog-list mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/nlog-list
NLog Blog
Reply | Threaded
Open this post in threaded view
|

${exception:format=stacktrace} doesn't work for me

Nagarajan-2-2
Hi All

${exception:format=stacktrace} doesn't work for me, is writes nothing in the log file. but ${stacktrace:format=raw} works fine.
below is my configuration.

    <nlog autoReload="true">
        <targets>
            <target name="infoWarn" type="File"   filename="${basedir}/logs/${date:format=yyyy-MM-dd}_log.txt" layout="${counter:increment=1}|${longdate}|${level:uppercase=true}|${logger}|${message}"/>
            <target name="fatalError" type="File" filename="${basedir}/logs/${date:format=yyyy-MM-dd}_log.txt"
           layout="${counter:increment=1}|${longdate}|${level:uppercase=true}|${logger}|${message}${newline}${exception:format=stacktrace}"/>
        </targets>
        <rules>
            <logger name="*" levels="Info,Warn" writeTo="infoWarn"/>
            <logger name="*" levels="Error,Fatal" writeTo="fatalError"/>
        </rules>
    </nlog>

can anybody help me on this.

Awaiting your reply,
- Naga




Jaroslaw Kowalski wrote:
v0.95 and future versions are compatible with .NET 2.0. There's just one NLog.dll that works with all platforms.
v1.0 will have separate builds for all supported frameworks. Preview is already available at

http://www.nlog-project.org/snapshots/

NLog is designed to have minimal impact on application performance.

Assuming that your logging statements are ineffective (such as logger.Debug("message") but you've set the minlevel to "Info"), NLog's performance impact is minimal (equal to the cost of a single boolean comparison). Actual logging does take some CPU and IO time, but that's not avoidable. NLog has asynchronous logging that does the logging in a separate thread so your app threads finish more quickly.

I'll write more about performance soon.

Jarek

----- Original Message ----- From: "Lakshmi Saripella" [hidden email]
To: "Jaroslaw Kowalski" [hidden email]
Cc: [hidden email]
Sent: Thursday, June 01, 2006 8:39 AM
Subject: Re: nlog - not creating log files when used with web applications - IT WORKED - NEED ONE MORE ADVISE


Thanks again. I've got few more queries, as mentioned below. As I'm the
beginner of NLog, keen to get few things clarified from experts, before
being implemented in our projects

How about NLog compatibility to .NET 2.0?
Having nlog in-place in .net application, will it any way impact the
application performance (in terms of execution speed)?
Where can I have comparision of its functionality in terms of
effectiveness, performance, and features against its counterparts (Log4Net,
EL   etc.)?


Awaiting your reply.

Sincerely,

Lakshmi Saripella


----- Original Message ----- From: "Jaroslaw Kowalski" [hidden email]
To: "Lakshmi Saripella" [hidden email]
Cc: [hidden email]
Sent: Thursday, June 01, 2006 11:45 AM
Subject: Re: nlog - not creating log files when used with web applications -
IT WORKED - NEED ONE MORE ADVISE


We've been using NLog extensively for some time in our products and it
works
great.
As for the bugs, every software has them, NLog is not different (just like
log4net, EL and others). I'm not aware of any bug that would disturb
logging
in any way. If have throwExceptions="false" you'll get no exceptions in
your
app because NLog would swallow them.

1.0 will be released soon (I hope this month).

In the meantime you may try the more recent snapshots at

http://www.nlog-project.org/snapshots/

There's a new tutorial that will be in place for v1.0:

http://www.nlog-project.org/snapshots/20060528/web/tutorial.html

(the snapshots are not recommended for production yet, but they add some
features which you might like, such as Visual Studio.NET integration)

Jarek
----- Original Message ----- From: "Lakshmi Saripella" [hidden email]
To: "Jaroslaw Kowalski" [hidden email]
Cc: [hidden email]
Sent: Thursday, June 01, 2006 8:10 AM
Subject: Re: nlog - not creating log files when used with web
applications -
IT WORKED - NEED ONE MORE ADVISE


> Hi!
>
> Thanks a ton. It worked in all the ways i.e. creation of
> A> static named log files - TestLog.txt, logs/TestLog.txt,
> B> dynamic named log files - logs/yyyy-mm-dd_TestLog.txt,
> logs/yyyy-mm-dd_level_TestLog.log etc
>
> on following exactly what has been said by you.
>
> Now, having got the log file created with respective contents in
required
> ways,
> I'm more interested in knowing the stability of the product in
production
> code.
>
> I suppose it is a matured product and will not have any issues when > used
> extensively in production code.
> I also assume that it has been used in most of the medium to huge .net
> projects, as replacement to Log4Net.
>
> We can  not afford (in fact, none) bugs being thrown or unstable
behaviour
> of the product, when used in
> production code Hope you are getting me in right sense.
>
> Pls. advice.
>
> Sincerely,
>
> Lakshmi Saripella
>
>
>
> From: Jaroslaw Kowalski
> To: Lakshmi Saripella
> Cc: [hidden email]
> Sent: Thursday, June 01, 2006 9:46 AM
> Subject: Re: nlog - not creating log files when used with web
applications
>
>
> One more thing, you should remove the programmatic configuration code
from
> Global.asax.cs as this overrides the configuration file.
>
> Jarek
>
> ----- Original Message ----- > From: "Jaroslaw Kowalski" [hidden email]
> To: "Lakshmi Saripella" [hidden email]
> Sent: Thursday, June 01, 2006 9:39 AM
> Subject: Re: nlog - not creating log files when used with web
applications
>
>
>> The contents of web.nlog are malformed (it's not valid XML):
>>
>> Should be:
>>
>> <nlog throwExceptions="true">
>>   <targets>
>>     <target name="console" type="Console"
>> layout="${longdate}|${logger}|${level}|${message}" />
>>     <target name="file" type="File" filename="${basedir}/testlog.txt"
/>
>>   </targets>
>>   <rules>
>>     <logger name="*" minlevel="Debug" appendTo="console,file" />
>>   </rules>
>> </nlog>
>>
>> (no <configuration> nor <configSections> are necessary here). One more
>> thing. You don't have access to the console while in ASP.NET
application,
>> you should remove the console target.
>>
>> Jarek
>>
>> ----- Original Message ----- >> From: Lakshmi Saripella
>> To: Jaroslaw Kowalski
>> Cc: [hidden email]
>> Sent: Thursday, June 01, 2006 5:51 AM
>> Subject: Re: nlog - not creating log files when used with web
>> applications
>>
>>
>> Hi!
>>
>> Thanks for info. It did not throw any errors.
>>
>> I'm trying to execute the sample application (ASPNetTraceTest), which
>> I've
>> got on downloading nlog-0.95-bin.zip (binary version), by configuring
the
>> web.nlog file, in order to log messages to .log files.
>>
>> Trace.axd portion worked well. I'm more keen in having .log files with
>> various names (viz., 20060601AppLog.log in logs folder etc.) as
mentioned
> in
>> NLog documentation
>>
>> Find attached my web application, with all the config files and rest
all.
>>
>> Pls. advice me asap. I need to put this in-place in our project at the
>> earliest.
>>
>>
>> Thanks,
>>
>> Lakshmi Saripella
>>
>> ----- Original Message ----- >> From: Jaroslaw Kowalski
>> To: Lakshmi Saripella
>> Sent: Wednesday, May 31, 2006 11:07 PM
>> Subject: Re: nlog - not creating log files when used with web
>> applications
>>
>>
>> Please add <nlog throwExceptions="true" /> and let me know if you get
any
>> errors.
>>
>> Jarek
>> ----- Original Message ----- >> From: Lakshmi Saripella
>> To: [hidden email]
>> Sent: Wednesday, May 31, 2006 6:16 PM
>> Subject: Fw: nlog - not creating log files when used with web
>> applications
>>
>>
>>
>> ----- Original Message ----- >> From: Lakshmi Saripella
>> To: [hidden email]
>> Cc: [hidden email]
>> Sent: Wednesday, May 31, 2006 9:42 PM
>> Subject: nlog - not creating log files when used with web applications
>>
>>
>> Hi!
>>
>> I'm trying to use NLog with my .net web application and followed all
the
>> given instructions. However, I do not get to see the .log files >> getting
>> created when applying with .net web application. In contrast the log
>> files
>> are getting created when applied with windows application.
>>
>> Any input is highly appreciating.
>>
>> Thanks in advance
>>
>> Lakshmi Saripella
>>
>>
>






-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642
_______________________________________________
Nlog-list mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/nlog-list