You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-dev@logging.apache.org by kshah82 <ki...@persistent.co.in> on 2010/12/27 15:31:55 UTC

Shared log4net config file for multiple programs

Hi,

Currently we are having 2 programs which are using centralized log4net
config resided at some location like "C:". Now the no. of programs can be
increased later on 20 to 25. Now, we want that we should be able to set
severity level for each program independeltly without creating separate
appender for each of them . How can we achieve this ? We know that for each
of program we can create separate appender and reference it on individual
logger(which is based on each service) to achieve this. Bus is there any
other way around ?
-- 
View this message in context: http://old.nabble.com/Shared-log4net-config-file-for-multiple-programs-tp30539308p30539308.html
Sent from the Log4net - Dev mailing list archive at Nabble.com.

Re: Shared log4net config file for multiple programs

Posted by kshah82 <ki...@persistent.co.in>.
Hi 
Thanks for your reply. But we want to chage serverity level in configuration
file at run time without restarting program. So, below apporach will not
work for us. Can we provide custom attributes to <appender-ref> tag in
<logger> tag ?



Dominik Psenner wrote:
> 
> Hi,
> 
> you could load the configuration from file and alter it in each
> program so that it fits your requirements. You have full access to the
> log4net logging system also in code.
> 
> regards & happy new year,
> d.
> 
> 2010/12/27 kshah82 <ki...@persistent.co.in>:
>> Hi, Currently we are having 2 programs which are using centralized
>> log4net
>> config resided at some location like "C:". Now the no. of programs can be
>> increased later on 20 to 25. Now, we want that we should be able to set
>> severity level for each program independeltly without creating separate
>> appender for each of them . How can we achieve this ? We know that for
>> each
>> of program we can create separate appender and reference it on individual
>> logger(which is based on each service) to achieve this. Bus is there any
>> other way around ?
>> ________________________________
>> View this message in context: Shared log4net config file for multiple
>> programs
>> Sent from the Log4net - Dev mailing list archive at Nabble.com.
>>
> 
> 
> 
> -- 
> Dominik Psenner
> ## OpenPGP Key Signature #################################
> # Key ID: B469318C                                       #
> # Fingerprint: 558641995F7EC2D251354C3A49C7E3D1B469318C  #
> ##########################################################
> 
> 

-- 
View this message in context: http://old.nabble.com/Re%3A-Shared-log4net-config-file-for-multiple-programs-tp30544223p30549464.html
Sent from the Log4net - Dev mailing list archive at Nabble.com.


Re: Shared log4net config file for multiple programs

Posted by kshah82 <ki...@persistent.co.in>.


Dominik Psenner wrote:
> 
> Hi,
> 
> you could load the configuration from file and alter it in each
> program so that it fits your requirements. You have full access to the
> log4net logging system also in code.
> 
> regards & happy new year,
> d.
> 
> 2010/12/27 kshah82 <ki...@persistent.co.in>:
>> Hi, Currently we are having 2 programs which are using centralized
>> log4net
>> config resided at some location like "C:". Now the no. of programs can be
>> increased later on 20 to 25. Now, we want that we should be able to set
>> severity level for each program independeltly without creating separate
>> appender for each of them . How can we achieve this ? We know that for
>> each
>> of program we can create separate appender and reference it on individual
>> logger(which is based on each service) to achieve this. Bus is there any
>> other way around ?
>> ________________________________
>> View this message in context: Shared log4net config file for multiple
>> programs
>> Sent from the Log4net - Dev mailing list archive at Nabble.com.
>>
> 
> 
> 
> -- 
> Dominik Psenner
> ## OpenPGP Key Signature #################################
> # Key ID: B469318C                                       #
> # Fingerprint: 558641995F7EC2D251354C3A49C7E3D1B469318C  #
> ##########################################################
> 
> 

-- 
View this message in context: http://old.nabble.com/Re%3A-Shared-log4net-config-file-for-multiple-programs-tp30544223p30549258.html
Sent from the Log4net - Dev mailing list archive at Nabble.com.


Re: Shared log4net config file for multiple programs

Posted by kshah82 <ki...@persistent.co.in>.
Hi,

Please ignore this query posted by me. Try to give answer query which is
having subject like "Multiple programs using common log4net config file "

Thanks in advance,
Kinnar


Dominik Psenner wrote:
> 
> Hi,
> 
> you could load the configuration from file and alter it in each
> program so that it fits your requirements. You have full access to the
> log4net logging system also in code.
> 
> regards & happy new year,
> d.
> 
> 2010/12/27 kshah82 <ki...@persistent.co.in>:
>> Hi, Currently we are having 2 programs which are using centralized
>> log4net
>> config resided at some location like "C:". Now the no. of programs can be
>> increased later on 20 to 25. Now, we want that we should be able to set
>> severity level for each program independeltly without creating separate
>> appender for each of them . How can we achieve this ? We know that for
>> each
>> of program we can create separate appender and reference it on individual
>> logger(which is based on each service) to achieve this. Bus is there any
>> other way around ?
>> ________________________________
>> View this message in context: Shared log4net config file for multiple
>> programs
>> Sent from the Log4net - Dev mailing list archive at Nabble.com.
>>
> 
> 
> 
> -- 
> Dominik Psenner
> ## OpenPGP Key Signature #################################
> # Key ID: B469318C                                       #
> # Fingerprint: 558641995F7EC2D251354C3A49C7E3D1B469318C  #
> ##########################################################
> 
> 

-- 
View this message in context: http://old.nabble.com/Re%3A-Shared-log4net-config-file-for-multiple-programs-tp30544223p30549257.html
Sent from the Log4net - Dev mailing list archive at Nabble.com.


Re: Shared log4net config file for multiple programs

Posted by kshah82 <ki...@persistent.co.in>.
Hi,

Please ignore my this query. Try to answer query which is having subject
like "Multiple programs using common log4net config file ".

Thanks,
Kinnar


Dominik Psenner wrote:
> 
> Hi,
> 
> you could load the configuration from file and alter it in each
> program so that it fits your requirements. You have full access to the
> log4net logging system also in code.
> 
> regards & happy new year,
> d.
> 
> 2010/12/27 kshah82 <ki...@persistent.co.in>:
>> Hi, Currently we are having 2 programs which are using centralized
>> log4net
>> config resided at some location like "C:". Now the no. of programs can be
>> increased later on 20 to 25. Now, we want that we should be able to set
>> severity level for each program independeltly without creating separate
>> appender for each of them . How can we achieve this ? We know that for
>> each
>> of program we can create separate appender and reference it on individual
>> logger(which is based on each service) to achieve this. Bus is there any
>> other way around ?
>> ________________________________
>> View this message in context: Shared log4net config file for multiple
>> programs
>> Sent from the Log4net - Dev mailing list archive at Nabble.com.
>>
> 
> 
> 
> -- 
> Dominik Psenner
> ## OpenPGP Key Signature #################################
> # Key ID: B469318C                                       #
> # Fingerprint: 558641995F7EC2D251354C3A49C7E3D1B469318C  #
> ##########################################################
> 
> 

-- 
View this message in context: http://old.nabble.com/Re%3A-Shared-log4net-config-file-for-multiple-programs-tp30544223p30549264.html
Sent from the Log4net - Dev mailing list archive at Nabble.com.


Re: Shared log4net config file for multiple programs

Posted by Dominik Psenner <dp...@gmail.com>.
Hi,

you could load the configuration from file and alter it in each
program so that it fits your requirements. You have full access to the
log4net logging system also in code.

regards & happy new year,
d.

2010/12/27 kshah82 <ki...@persistent.co.in>:
> Hi, Currently we are having 2 programs which are using centralized log4net
> config resided at some location like "C:". Now the no. of programs can be
> increased later on 20 to 25. Now, we want that we should be able to set
> severity level for each program independeltly without creating separate
> appender for each of them . How can we achieve this ? We know that for each
> of program we can create separate appender and reference it on individual
> logger(which is based on each service) to achieve this. Bus is there any
> other way around ?
> ________________________________
> View this message in context: Shared log4net config file for multiple
> programs
> Sent from the Log4net - Dev mailing list archive at Nabble.com.
>



-- 
Dominik Psenner
## OpenPGP Key Signature #################################
# Key ID: B469318C                                       #
# Fingerprint: 558641995F7EC2D251354C3A49C7E3D1B469318C  #
##########################################################