You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-user@logging.apache.org by ra...@accenture.com on 2009/08/14 16:58:53 UTC

App.Config Location

Hi,

 

I have two or more different applications in which I need to log my
exceptions to the log file, and by using the Log4Net framework.

Each application has its own logging settings.  

The requirement is such that to build a rapper class for log4Net and use
the framework and use the .Config file with respect to the Application.

 

Can you please send me the following information.

*         Do you have any rapper class ready.

*         Can we place the .config file in a separate folder and how to
access it.

 

Thanks in advance.

 

Thanks & Regards,

Raghuram Raichooti 
________________________________________________________________________
________________________________________
Mobile: +91 98661 83441 | MSN: rvs_raghu@hotmail.com
<ma...@hotmail.com>  | AIM: raghuraichooti

 



This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information.  If you have received it in error, please notify the sender immediately and delete the original.  Any other use of the email by you is prohibited.

Re: App.Config Location

Posted by Ross Hinkley <ro...@gmail.com>.
Raghuram,

For your time zone question, I'm guessing you want the time zone name?  You
have a few options: use the %property{} feature of log4net and set the time
zone in code, use %utcdate, or use 'z' in the date formatter (this will only
give you the +/- hours ahead/behind GMT, not the time zone name).

Those are just off the top of my head.  Does someone else know if you can
log the time zone some other way?

If you're concerned about cross-timezone processes, especially ones logging
to the same place (like a database), I'd recommend you log using the UTC
date.  It's much easier to read through logs if the times are consistent
with one another.

>From your diagram, I'm still not seeing the benefit of using your own
framework.  Log4Net will log to a file natively.  What sort of requirements
do you have that make you believe you'll need your own framework or class?

If handling log data yourself is something you want to pursue, I'd recommend
looking into creating your own appender.

-Ross

On Mon, Aug 17, 2009 at 2:12 AM, <ra...@accenture.com> wrote:

>  As you said I was using the same Log4Net, but after my requirements
> changed I was planning to make a rapper class or a small framework to
> receive the parameters from the application and manuplate the data as
> required in the class / framework and using the Log4Net I would like to
> using the logging. Rather than using log4Net in all the project I would like
> to use my logging framework and then use the log4Net.
>
> In the conversion pattern if I would like to make the date stamped with the
> time zone even
>
> <conversionPattern value=”%date [%thread] %-5level - %message%newline” / >
>
>
>
> If I need help on this parameters where can I get.
>
>
>
> Thanks in advance.
>
> Regards,
>
> *Raghuram Raichooti*
> *
> ________________________________________________________________________________________________________________
> *
>
>
>
> *From:* Ross Hinkley [mailto:rosshinkley@gmail.com]
> *Sent:* Saturday, August 15, 2009 12:09 AM
> *To:* Log4NET User
> *Subject:* Re: App.Config Location
>
>
>
> Raghuram,
>
> Why build a wrapper class?  It sounds like log4net will do what you're
> asking out of the box.  Are there more requirements?
>
> To speak to your second question about configuring the location of the log
> file: yes, you can specify an external log config.  There was a thread on
> that not too long ago; you can find it here:
>
> http://www.mail-archive.com/log4net-user@logging.apache.org/msg05040.html
>
> That should hopefully give you a few ideas.
>
> -Ross
>
> On Fri, Aug 14, 2009 at 9:58 AM, <ra...@accenture.com> wrote:
>
> Hi,
>
>
>
> I have two or more different applications in which I need to log my
> exceptions to the log file, and by using the Log4Net framework.
>
> Each application has its own logging settings.
>
> The requirement is such that to build a rapper class for log4Net and use
> the framework and use the .Config file with respect to the Application.
>
>
>
> Can you please send me the following information.
>
> ·         Do you have any rapper class ready.
>
> ·         Can we place the .config file in a separate folder and how to
> access it.
>
>
>
> Thanks in advance.
>
>
>
> Thanks & Regards,
>
> *Raghuram Raichooti*
> *
> ________________________________________________________________________________________________________________
> *
> Mobile: +91 98661 83441 | MSN: rvs_raghu@hotmail.com | AIM: raghuraichooti
>
>
>
> This message is for the designated recipient only and may contain
> privileged, proprietary, or otherwise private information. If you have
> received it in error, please notify the sender immediately and delete the
> original. Any other use of the email by you is prohibited.
>
>
>
> This message is for the designated recipient only and may contain
> privileged, proprietary, or otherwise private information. If you have
> received it in error, please notify the sender immediately and delete the
> original. Any other use of the email by you is prohibited.
>

RE: App.Config Location

Posted by ra...@accenture.com.
As you said I was using the same Log4Net, but after my requirements
changed I was planning to make a rapper class or a small framework to
receive the parameters from the application and manuplate the data as
required in the class / framework and using the Log4Net I would like to
using the logging. Rather than using log4Net in all the project I would
like to use my logging framework and then use the log4Net.

 

In the conversion pattern if I would like to make the date stamped with
the time zone even

<conversionPattern value="%date [%thread] %-5level - %message%newline" /
>

 

If I need help on this parameters where can I get.

 

Thanks in advance.

Regards,

Raghuram Raichooti 
________________________________________________________________________
________________________________________

 

From: Ross Hinkley [mailto:rosshinkley@gmail.com] 
Sent: Saturday, August 15, 2009 12:09 AM
To: Log4NET User
Subject: Re: App.Config Location

 

Raghuram,

Why build a wrapper class?  It sounds like log4net will do what you're
asking out of the box.  Are there more requirements?

To speak to your second question about configuring the location of the
log file: yes, you can specify an external log config.  There was a
thread on that not too long ago; you can find it here:

http://www.mail-archive.com/log4net-user@logging.apache.org/msg05040.htm
l

That should hopefully give you a few ideas.

-Ross

On Fri, Aug 14, 2009 at 9:58 AM, <ra...@accenture.com>
wrote:

Hi,

 

I have two or more different applications in which I need to log my
exceptions to the log file, and by using the Log4Net framework.

Each application has its own logging settings.  

The requirement is such that to build a rapper class for log4Net and use
the framework and use the .Config file with respect to the Application.

 

Can you please send me the following information.

*         Do you have any rapper class ready.

*         Can we place the .config file in a separate folder and how to
access it.

 

Thanks in advance.

 

Thanks & Regards,

Raghuram Raichooti 
________________________________________________________________________
________________________________________
Mobile: +91 98661 83441 | MSN: rvs_raghu@hotmail.com
<ma...@hotmail.com>  | AIM: raghuraichooti

 

This message is for the designated recipient only and may contain
privileged, proprietary, or otherwise private information. If you have
received it in error, please notify the sender immediately and delete
the original. Any other use of the email by you is prohibited.

 



This message is for the designated recipient only and may contain privileged, proprietary, or otherwise private information.  If you have received it in error, please notify the sender immediately and delete the original.  Any other use of the email by you is prohibited.

Re: App.Config Location

Posted by Ross Hinkley <ro...@gmail.com>.
Raghuram,

Why build a wrapper class?  It sounds like log4net will do what you're
asking out of the box.  Are there more requirements?

To speak to your second question about configuring the location of the log
file: yes, you can specify an external log config.  There was a thread on
that not too long ago; you can find it here:

http://www.mail-archive.com/log4net-user@logging.apache.org/msg05040.html

That should hopefully give you a few ideas.

-Ross

On Fri, Aug 14, 2009 at 9:58 AM, <ra...@accenture.com> wrote:

>  Hi,
>
>
>
> I have two or more different applications in which I need to log my
> exceptions to the log file, and by using the Log4Net framework.
>
> Each application has its own logging settings.
>
> The requirement is such that to build a rapper class for log4Net and use
> the framework and use the .Config file with respect to the Application.
>
>
>
> Can you please send me the following information.
>
> ·         Do you have any rapper class ready.
>
> ·         Can we place the .config file in a separate folder and how to
> access it.
>
>
>
> Thanks in advance.
>
>
>
> Thanks & Regards,
>
> *Raghuram Raichooti*
> *
> ________________________________________________________________________________________________________________
> *
> Mobile: +91 98661 83441 | MSN: rvs_raghu@hotmail.com | AIM: raghuraichooti
>
>
>
> This message is for the designated recipient only and may contain
> privileged, proprietary, or otherwise private information. If you have
> received it in error, please notify the sender immediately and delete the
> original. Any other use of the email by you is prohibited.
>