You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Hui Xie <xi...@nortel.com> on 2006/04/05 09:50:51 UTC
Question about log4j Solaris 10 support
> Hi All,
>
> I'm from R&D of Nortel. We have been using log4j 1.2 in our product
> for years. Now we are planning to upgrade our platform from Solaris 9
> to Solaris 10. So I am not sure if there will be any impact on log4j?
> In other words, is log4j fully compatible with Solaris 10? Could
> anyone who knows this information please help me out with my question?
> Or could you please tell me from where I can find this information?
>
> Thank you in advance for your time and great support.
>
> Best Regards,
>
> Hui Xie
Re: How to make log4j "environment-aware"
Posted by James Stauffer <st...@gmail.com>.
The way that we do it is to not deploy the log4j conf file. You could
also deploy both a dev and prod version and use -Dlog4j.configuration
to have dev use the dev version and prod use the prod version.
On 4/5/06, pantichd@firstenergycorp.com <pa...@firstenergycorp.com> wrote:
> Technically, I suppose I could find some way around SAP's quirks but I'm
> not sure what that would accomplish. Someone would still need to manually
> sign on to the production server and put a log4j.properties file there. As
> a developer, I don't have access to the production server.
>
> In the best-case situation, this would only need to be done once (at
> initial deployment).
>
> However, if I later need to modify the file I'd have to make sure that my
> modifications made their way into the production version of the file.
>
> I hate to go around the automated deployment process.
>
> Isn't this a common issue? I would think that others have the need to have
> different logging levels depending on whether the code is running on
> development or production.
>
>
> David Z. Pantich
> FirstEnergy Corp.
> E-mail: pantichd@firstenergycorp.com
> Phone: (330) 315-6775
> Mail Stop: Ghent 308A
>
>
>
>
> "James Stauffer"
> <stauffer.james@g
> mail.com> To
> "Log4J Users List"
> 04/05/2006 09:36 <lo...@logging.apache.org>
> AM cc
>
> Subject
> Please respond to Re: How to make log4j
> "Log4J Users "environment-aware"
> List"
> <log4j-user@loggi
> ng.apache.org>
>
>
>
>
>
>
>
> Can you keep the config file out of the deployment?
>
> On 4/5/06, pantichd@firstenergycorp.com <pa...@firstenergycorp.com>
> wrote:
> > Hello,
> >
> > I'm fairly new to log4j so please excuse me if I'm asking a question
> that's
> > really basic. I've searched the archives but I haven't found something
> that
> > applies to my specific question.
> >
> > Is there a way to make log4j "environment aware"? By that I mean that it
> > would print debug messages if running on development but only error or
> > fatal messages on production.
> >
> > I've seen some messages that suggest creating separate log4j.properties
> > files for each environment. That would be a little difficult in our
> > environment. We are using SAP's Netweaver platform and it's "transport"
> > process. Once you've deployed your app to development there is no way to
> > modify the deployment before it goes to production. The only way would be
> > to manually go into the production server AFTER the deployment and change
> > the log4j.properties file. Obviously, that is undesirable!
> >
> > Thanks in advance for any help.
> >
> > David
> >
> >
> > -----------------------------------------
> > The information contained in this message is intended only for the
> > personal and confidential use of the recipient(s) named above. If
> > the reader of this message is not the intended recipient or an
> > agent responsible for delivering it to the intended recipient, you
> > are hereby notified that you have received this document in error
> > and that any review, dissemination, distribution, or copying of
> > this message is strictly prohibited. If you have received this
> > communication in error, please notify us immediately, and delete
> > the original message.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> >
> >
>
>
> --
> James Stauffer
> Are you good? Take the test at http://www.livingwaters.com/good/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>
--
James Stauffer
Are you good? Take the test at http://www.livingwaters.com/good/
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
Re: How to make log4j "environment-aware"
Posted by pa...@firstenergycorp.com.
Technically, I suppose I could find some way around SAP's quirks but I'm
not sure what that would accomplish. Someone would still need to manually
sign on to the production server and put a log4j.properties file there. As
a developer, I don't have access to the production server.
In the best-case situation, this would only need to be done once (at
initial deployment).
However, if I later need to modify the file I'd have to make sure that my
modifications made their way into the production version of the file.
I hate to go around the automated deployment process.
Isn't this a common issue? I would think that others have the need to have
different logging levels depending on whether the code is running on
development or production.
David Z. Pantich
FirstEnergy Corp.
E-mail: pantichd@firstenergycorp.com
Phone: (330) 315-6775
Mail Stop: Ghent 308A
"James Stauffer"
<stauffer.james@g
mail.com> To
"Log4J Users List"
04/05/2006 09:36 <lo...@logging.apache.org>
AM cc
Subject
Please respond to Re: How to make log4j
"Log4J Users "environment-aware"
List"
<log4j-user@loggi
ng.apache.org>
Can you keep the config file out of the deployment?
On 4/5/06, pantichd@firstenergycorp.com <pa...@firstenergycorp.com>
wrote:
> Hello,
>
> I'm fairly new to log4j so please excuse me if I'm asking a question
that's
> really basic. I've searched the archives but I haven't found something
that
> applies to my specific question.
>
> Is there a way to make log4j "environment aware"? By that I mean that it
> would print debug messages if running on development but only error or
> fatal messages on production.
>
> I've seen some messages that suggest creating separate log4j.properties
> files for each environment. That would be a little difficult in our
> environment. We are using SAP's Netweaver platform and it's "transport"
> process. Once you've deployed your app to development there is no way to
> modify the deployment before it goes to production. The only way would be
> to manually go into the production server AFTER the deployment and change
> the log4j.properties file. Obviously, that is undesirable!
>
> Thanks in advance for any help.
>
> David
>
>
> -----------------------------------------
> The information contained in this message is intended only for the
> personal and confidential use of the recipient(s) named above. If
> the reader of this message is not the intended recipient or an
> agent responsible for delivering it to the intended recipient, you
> are hereby notified that you have received this document in error
> and that any review, dissemination, distribution, or copying of
> this message is strictly prohibited. If you have received this
> communication in error, please notify us immediately, and delete
> the original message.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>
--
James Stauffer
Are you good? Take the test at http://www.livingwaters.com/good/
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
Re: How to make log4j "environment-aware"
Posted by pa...@firstenergycorp.com.
Thanks James. I'll take a look and post my result(s).
"James Stauffer"
<stauffer.james@g
mail.com> To
"Log4J Users List"
04/05/2006 06:11 <lo...@logging.apache.org>
PM cc
Subject
Please respond to Re: How to make log4j
"Log4J Users "environment-aware"
List"
<log4j-user@loggi
ng.apache.org>
Look at "Example Configurations" in
http://logging.apache.org/log4j/docs/manual.html
It shows that if you don't specify a path it will look in WEB-INF/classes
On 4/5/06, pantichd@firstenergycorp.com <pa...@firstenergycorp.com>
wrote:
> Thanks for clarifying that.
>
> Still not sure that will work for our situation. Maybe I should have
given
> more information. Here's our environment:
>
> - 20+ apps (web sites) all of which may require different types of
logging.
> For example, site1 is critical and needs to send e-mails for certain
> errors. Site 2 is not used much so it's no big deal to just write to a
log
> file
> - We want to have each app write to its own log file. No special reason
> other than that it's easier than having to wade thru a huge logfile for
all
> the apps just to find the stuff that pertains to your own app
> - We want the ability to have different default level for each app
>
> Those (and more) are reasons why we really want to have separate log4j
> configuration files for each app. By putting the log4j.properties in
> WEB-INF/classes folder of each app we have the ability to customize log4j
> by app.
>
> That gets me to the original question... how can I make it environment
> aware so it knows it's running on dev or prod? Is there a way
> programatically to change the default level?
>
> Thanks again for your feedback.
>
> David
>
>
>
>
> "James Stauffer"
> <stauffer.james@g
> mail.com>
To
> "Log4J Users List"
> 04/05/2006 03:20 <lo...@logging.apache.org>
> PM
cc
>
>
Subject
> Please respond to Re: How to make log4j
> "Log4J Users "environment-aware"
> List"
> <log4j-user@loggi
> ng.apache.org>
>
>
>
>
>
>
>
> If there is a system property called log4j.configuration log4j will
> use the value as the path to the config file. That way you can setup
> prod to use one config file and dev to use another.
>
> On 4/5/06, pantichd@firstenergycorp.com <pa...@firstenergycorp.com>
> wrote:
> > Nicolas,
> >
> > Would you mind elaborating? What is the "-Dlog4j.configuration...."
piece
> > you're referring to?
> >
> > David
> >
> >
> >
> >
> > Nicolas De Loof
> > <nicolas.deloof@c
> > apgemini.com>
> To
> > Log4J Users List
> > 04/05/2006 09:59 <lo...@logging.apache.org>
> > AM
> cc
> >
> >
> Subject
> > Please respond to Re: How to make log4j
> > "Log4J Users "environment-aware"
> > List"
> > <log4j-user@loggi
> > ng.apache.org>
> >
> >
> >
> >
> >
> >
> >
> >
> > To solve this I'm using a custom log4j.xml (with debugs enabled) and
run
> > my app with
> > -Dlog4j.configuration=file:///D:/log4j.xml
> >
> > Using this, I can configure log4j for production and have all the
debugs
> > I need on my dev computer.
> >
> > James Stauffer a écrit :
> > > Can you keep the config file out of the deployment?
> > >
> > > On 4/5/06, pantichd@firstenergycorp.com
<pa...@firstenergycorp.com>
> > wrote:
> > >
> > >> Hello,
> > >>
> > >> I'm fairly new to log4j so please excuse me if I'm asking a question
> > that's
> > >> really basic. I've searched the archives but I haven't found
something
> > that
> > >> applies to my specific question.
> > >>
> > >> Is there a way to make log4j "environment aware"? By that I mean
that
> it
> > >> would print debug messages if running on development but only error
or
> > >> fatal messages on production.
> > >>
> > >> I've seen some messages that suggest creating separate
> log4j.properties
> > >> files for each environment. That would be a little difficult in our
> > >> environment. We are using SAP's Netweaver platform and it's
> "transport"
> > >> process. Once you've deployed your app to development there is no
way
> to
> > >> modify the deployment before it goes to production. The only way
would
> > be
> > >> to manually go into the production server AFTER the deployment and
> > change
> > >> the log4j.properties file. Obviously, that is undesirable!
> > >>
> > >> Thanks in advance for any help.
> > >>
> > >> David
> > >>
> > >>
> > >> -----------------------------------------
> > >> The information contained in this message is intended only for the
> > >> personal and confidential use of the recipient(s) named above. If
> > >> the reader of this message is not the intended recipient or an
> > >> agent responsible for delivering it to the intended recipient, you
> > >> are hereby notified that you have received this document in error
> > >> and that any review, dissemination, distribution, or copying of
> > >> this message is strictly prohibited. If you have received this
> > >> communication in error, please notify us immediately, and delete
> > >> the original message.
> > >>
> > >>
> > >>
---------------------------------------------------------------------
> > >> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > >> For additional commands, e-mail: log4j-user-help@logging.apache.org
> > >>
> > >>
> > >>
> > >
> > >
> > > --
> > > James Stauffer
> > > Are you good? Take the test at http://www.livingwaters.com/good/
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > > For additional commands, e-mail: log4j-user-help@logging.apache.org
> > >
> > >
> > >
> >
> > This message contains information that may be privileged or
confidential
> > and is the property of the Capgemini Group. It is intended only for the
> > person to whom it is addressed. If you are not the intended recipient,
> you
> > are not authorized to read, print, retain, copy, disseminate,
> distribute,
> > or use this message or any part thereof. If you receive this message
in
> > error, please notify the sender immediately and delete all copies of
> this
> > message.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> >
> >
>
>
> --
> James Stauffer
> Are you good? Take the test at http://www.livingwaters.com/good/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>
--
James Stauffer
Are you good? Take the test at http://www.livingwaters.com/good/
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
Re: How to make log4j "environment-aware"
Posted by James Stauffer <st...@gmail.com>.
Look at "Example Configurations" in
http://logging.apache.org/log4j/docs/manual.html
It shows that if you don't specify a path it will look in WEB-INF/classes
On 4/5/06, pantichd@firstenergycorp.com <pa...@firstenergycorp.com> wrote:
> Thanks for clarifying that.
>
> Still not sure that will work for our situation. Maybe I should have given
> more information. Here's our environment:
>
> - 20+ apps (web sites) all of which may require different types of logging.
> For example, site1 is critical and needs to send e-mails for certain
> errors. Site 2 is not used much so it's no big deal to just write to a log
> file
> - We want to have each app write to its own log file. No special reason
> other than that it's easier than having to wade thru a huge logfile for all
> the apps just to find the stuff that pertains to your own app
> - We want the ability to have different default level for each app
>
> Those (and more) are reasons why we really want to have separate log4j
> configuration files for each app. By putting the log4j.properties in
> WEB-INF/classes folder of each app we have the ability to customize log4j
> by app.
>
> That gets me to the original question... how can I make it environment
> aware so it knows it's running on dev or prod? Is there a way
> programatically to change the default level?
>
> Thanks again for your feedback.
>
> David
>
>
>
>
> "James Stauffer"
> <stauffer.james@g
> mail.com> To
> "Log4J Users List"
> 04/05/2006 03:20 <lo...@logging.apache.org>
> PM cc
>
> Subject
> Please respond to Re: How to make log4j
> "Log4J Users "environment-aware"
> List"
> <log4j-user@loggi
> ng.apache.org>
>
>
>
>
>
>
>
> If there is a system property called log4j.configuration log4j will
> use the value as the path to the config file. That way you can setup
> prod to use one config file and dev to use another.
>
> On 4/5/06, pantichd@firstenergycorp.com <pa...@firstenergycorp.com>
> wrote:
> > Nicolas,
> >
> > Would you mind elaborating? What is the "-Dlog4j.configuration...." piece
> > you're referring to?
> >
> > David
> >
> >
> >
> >
> > Nicolas De Loof
> > <nicolas.deloof@c
> > apgemini.com>
> To
> > Log4J Users List
> > 04/05/2006 09:59 <lo...@logging.apache.org>
> > AM
> cc
> >
> >
> Subject
> > Please respond to Re: How to make log4j
> > "Log4J Users "environment-aware"
> > List"
> > <log4j-user@loggi
> > ng.apache.org>
> >
> >
> >
> >
> >
> >
> >
> >
> > To solve this I'm using a custom log4j.xml (with debugs enabled) and run
> > my app with
> > -Dlog4j.configuration=file:///D:/log4j.xml
> >
> > Using this, I can configure log4j for production and have all the debugs
> > I need on my dev computer.
> >
> > James Stauffer a écrit :
> > > Can you keep the config file out of the deployment?
> > >
> > > On 4/5/06, pantichd@firstenergycorp.com <pa...@firstenergycorp.com>
> > wrote:
> > >
> > >> Hello,
> > >>
> > >> I'm fairly new to log4j so please excuse me if I'm asking a question
> > that's
> > >> really basic. I've searched the archives but I haven't found something
> > that
> > >> applies to my specific question.
> > >>
> > >> Is there a way to make log4j "environment aware"? By that I mean that
> it
> > >> would print debug messages if running on development but only error or
> > >> fatal messages on production.
> > >>
> > >> I've seen some messages that suggest creating separate
> log4j.properties
> > >> files for each environment. That would be a little difficult in our
> > >> environment. We are using SAP's Netweaver platform and it's
> "transport"
> > >> process. Once you've deployed your app to development there is no way
> to
> > >> modify the deployment before it goes to production. The only way would
> > be
> > >> to manually go into the production server AFTER the deployment and
> > change
> > >> the log4j.properties file. Obviously, that is undesirable!
> > >>
> > >> Thanks in advance for any help.
> > >>
> > >> David
> > >>
> > >>
> > >> -----------------------------------------
> > >> The information contained in this message is intended only for the
> > >> personal and confidential use of the recipient(s) named above. If
> > >> the reader of this message is not the intended recipient or an
> > >> agent responsible for delivering it to the intended recipient, you
> > >> are hereby notified that you have received this document in error
> > >> and that any review, dissemination, distribution, or copying of
> > >> this message is strictly prohibited. If you have received this
> > >> communication in error, please notify us immediately, and delete
> > >> the original message.
> > >>
> > >>
> > >> ---------------------------------------------------------------------
> > >> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > >> For additional commands, e-mail: log4j-user-help@logging.apache.org
> > >>
> > >>
> > >>
> > >
> > >
> > > --
> > > James Stauffer
> > > Are you good? Take the test at http://www.livingwaters.com/good/
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > > For additional commands, e-mail: log4j-user-help@logging.apache.org
> > >
> > >
> > >
> >
> > This message contains information that may be privileged or confidential
> > and is the property of the Capgemini Group. It is intended only for the
> > person to whom it is addressed. If you are not the intended recipient,
> you
> > are not authorized to read, print, retain, copy, disseminate,
> distribute,
> > or use this message or any part thereof. If you receive this message in
> > error, please notify the sender immediately and delete all copies of
> this
> > message.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> >
> >
>
>
> --
> James Stauffer
> Are you good? Take the test at http://www.livingwaters.com/good/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>
--
James Stauffer
Are you good? Take the test at http://www.livingwaters.com/good/
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
Re: How to make log4j "environment-aware"
Posted by pa...@firstenergycorp.com.
Thanks for clarifying that.
Still not sure that will work for our situation. Maybe I should have given
more information. Here's our environment:
- 20+ apps (web sites) all of which may require different types of logging.
For example, site1 is critical and needs to send e-mails for certain
errors. Site 2 is not used much so it's no big deal to just write to a log
file
- We want to have each app write to its own log file. No special reason
other than that it's easier than having to wade thru a huge logfile for all
the apps just to find the stuff that pertains to your own app
- We want the ability to have different default level for each app
Those (and more) are reasons why we really want to have separate log4j
configuration files for each app. By putting the log4j.properties in
WEB-INF/classes folder of each app we have the ability to customize log4j
by app.
That gets me to the original question... how can I make it environment
aware so it knows it's running on dev or prod? Is there a way
programatically to change the default level?
Thanks again for your feedback.
David
"James Stauffer"
<stauffer.james@g
mail.com> To
"Log4J Users List"
04/05/2006 03:20 <lo...@logging.apache.org>
PM cc
Subject
Please respond to Re: How to make log4j
"Log4J Users "environment-aware"
List"
<log4j-user@loggi
ng.apache.org>
If there is a system property called log4j.configuration log4j will
use the value as the path to the config file. That way you can setup
prod to use one config file and dev to use another.
On 4/5/06, pantichd@firstenergycorp.com <pa...@firstenergycorp.com>
wrote:
> Nicolas,
>
> Would you mind elaborating? What is the "-Dlog4j.configuration...." piece
> you're referring to?
>
> David
>
>
>
>
> Nicolas De Loof
> <nicolas.deloof@c
> apgemini.com>
To
> Log4J Users List
> 04/05/2006 09:59 <lo...@logging.apache.org>
> AM
cc
>
>
Subject
> Please respond to Re: How to make log4j
> "Log4J Users "environment-aware"
> List"
> <log4j-user@loggi
> ng.apache.org>
>
>
>
>
>
>
>
>
> To solve this I'm using a custom log4j.xml (with debugs enabled) and run
> my app with
> -Dlog4j.configuration=file:///D:/log4j.xml
>
> Using this, I can configure log4j for production and have all the debugs
> I need on my dev computer.
>
> James Stauffer a écrit :
> > Can you keep the config file out of the deployment?
> >
> > On 4/5/06, pantichd@firstenergycorp.com <pa...@firstenergycorp.com>
> wrote:
> >
> >> Hello,
> >>
> >> I'm fairly new to log4j so please excuse me if I'm asking a question
> that's
> >> really basic. I've searched the archives but I haven't found something
> that
> >> applies to my specific question.
> >>
> >> Is there a way to make log4j "environment aware"? By that I mean that
it
> >> would print debug messages if running on development but only error or
> >> fatal messages on production.
> >>
> >> I've seen some messages that suggest creating separate
log4j.properties
> >> files for each environment. That would be a little difficult in our
> >> environment. We are using SAP's Netweaver platform and it's
"transport"
> >> process. Once you've deployed your app to development there is no way
to
> >> modify the deployment before it goes to production. The only way would
> be
> >> to manually go into the production server AFTER the deployment and
> change
> >> the log4j.properties file. Obviously, that is undesirable!
> >>
> >> Thanks in advance for any help.
> >>
> >> David
> >>
> >>
> >> -----------------------------------------
> >> The information contained in this message is intended only for the
> >> personal and confidential use of the recipient(s) named above. If
> >> the reader of this message is not the intended recipient or an
> >> agent responsible for delivering it to the intended recipient, you
> >> are hereby notified that you have received this document in error
> >> and that any review, dissemination, distribution, or copying of
> >> this message is strictly prohibited. If you have received this
> >> communication in error, please notify us immediately, and delete
> >> the original message.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> >> For additional commands, e-mail: log4j-user-help@logging.apache.org
> >>
> >>
> >>
> >
> >
> > --
> > James Stauffer
> > Are you good? Take the test at http://www.livingwaters.com/good/
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> >
> >
> >
>
> This message contains information that may be privileged or confidential
> and is the property of the Capgemini Group. It is intended only for the
> person to whom it is addressed. If you are not the intended recipient,
you
> are not authorized to read, print, retain, copy, disseminate,
distribute,
> or use this message or any part thereof. If you receive this message in
> error, please notify the sender immediately and delete all copies of
this
> message.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>
--
James Stauffer
Are you good? Take the test at http://www.livingwaters.com/good/
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
Re: How to make log4j "environment-aware"
Posted by James Stauffer <st...@gmail.com>.
If there is a system property called log4j.configuration log4j will
use the value as the path to the config file. That way you can setup
prod to use one config file and dev to use another.
On 4/5/06, pantichd@firstenergycorp.com <pa...@firstenergycorp.com> wrote:
> Nicolas,
>
> Would you mind elaborating? What is the "-Dlog4j.configuration...." piece
> you're referring to?
>
> David
>
>
>
>
> Nicolas De Loof
> <nicolas.deloof@c
> apgemini.com> To
> Log4J Users List
> 04/05/2006 09:59 <lo...@logging.apache.org>
> AM cc
>
> Subject
> Please respond to Re: How to make log4j
> "Log4J Users "environment-aware"
> List"
> <log4j-user@loggi
> ng.apache.org>
>
>
>
>
>
>
>
>
> To solve this I'm using a custom log4j.xml (with debugs enabled) and run
> my app with
> -Dlog4j.configuration=file:///D:/log4j.xml
>
> Using this, I can configure log4j for production and have all the debugs
> I need on my dev computer.
>
> James Stauffer a écrit :
> > Can you keep the config file out of the deployment?
> >
> > On 4/5/06, pantichd@firstenergycorp.com <pa...@firstenergycorp.com>
> wrote:
> >
> >> Hello,
> >>
> >> I'm fairly new to log4j so please excuse me if I'm asking a question
> that's
> >> really basic. I've searched the archives but I haven't found something
> that
> >> applies to my specific question.
> >>
> >> Is there a way to make log4j "environment aware"? By that I mean that it
> >> would print debug messages if running on development but only error or
> >> fatal messages on production.
> >>
> >> I've seen some messages that suggest creating separate log4j.properties
> >> files for each environment. That would be a little difficult in our
> >> environment. We are using SAP's Netweaver platform and it's "transport"
> >> process. Once you've deployed your app to development there is no way to
> >> modify the deployment before it goes to production. The only way would
> be
> >> to manually go into the production server AFTER the deployment and
> change
> >> the log4j.properties file. Obviously, that is undesirable!
> >>
> >> Thanks in advance for any help.
> >>
> >> David
> >>
> >>
> >> -----------------------------------------
> >> The information contained in this message is intended only for the
> >> personal and confidential use of the recipient(s) named above. If
> >> the reader of this message is not the intended recipient or an
> >> agent responsible for delivering it to the intended recipient, you
> >> are hereby notified that you have received this document in error
> >> and that any review, dissemination, distribution, or copying of
> >> this message is strictly prohibited. If you have received this
> >> communication in error, please notify us immediately, and delete
> >> the original message.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> >> For additional commands, e-mail: log4j-user-help@logging.apache.org
> >>
> >>
> >>
> >
> >
> > --
> > James Stauffer
> > Are you good? Take the test at http://www.livingwaters.com/good/
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> > For additional commands, e-mail: log4j-user-help@logging.apache.org
> >
> >
> >
>
> This message contains information that may be privileged or confidential
> and is the property of the Capgemini Group. It is intended only for the
> person to whom it is addressed. If you are not the intended recipient, you
> are not authorized to read, print, retain, copy, disseminate, distribute,
> or use this message or any part thereof. If you receive this message in
> error, please notify the sender immediately and delete all copies of this
> message.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>
--
James Stauffer
Are you good? Take the test at http://www.livingwaters.com/good/
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
Re: How to make log4j "environment-aware"
Posted by pa...@firstenergycorp.com.
Nicolas,
Would you mind elaborating? What is the "-Dlog4j.configuration...." piece
you're referring to?
David
Nicolas De Loof
<nicolas.deloof@c
apgemini.com> To
Log4J Users List
04/05/2006 09:59 <lo...@logging.apache.org>
AM cc
Subject
Please respond to Re: How to make log4j
"Log4J Users "environment-aware"
List"
<log4j-user@loggi
ng.apache.org>
To solve this I'm using a custom log4j.xml (with debugs enabled) and run
my app with
-Dlog4j.configuration=file:///D:/log4j.xml
Using this, I can configure log4j for production and have all the debugs
I need on my dev computer.
James Stauffer a écrit :
> Can you keep the config file out of the deployment?
>
> On 4/5/06, pantichd@firstenergycorp.com <pa...@firstenergycorp.com>
wrote:
>
>> Hello,
>>
>> I'm fairly new to log4j so please excuse me if I'm asking a question
that's
>> really basic. I've searched the archives but I haven't found something
that
>> applies to my specific question.
>>
>> Is there a way to make log4j "environment aware"? By that I mean that it
>> would print debug messages if running on development but only error or
>> fatal messages on production.
>>
>> I've seen some messages that suggest creating separate log4j.properties
>> files for each environment. That would be a little difficult in our
>> environment. We are using SAP's Netweaver platform and it's "transport"
>> process. Once you've deployed your app to development there is no way to
>> modify the deployment before it goes to production. The only way would
be
>> to manually go into the production server AFTER the deployment and
change
>> the log4j.properties file. Obviously, that is undesirable!
>>
>> Thanks in advance for any help.
>>
>> David
>>
>>
>> -----------------------------------------
>> The information contained in this message is intended only for the
>> personal and confidential use of the recipient(s) named above. If
>> the reader of this message is not the intended recipient or an
>> agent responsible for delivering it to the intended recipient, you
>> are hereby notified that you have received this document in error
>> and that any review, dissemination, distribution, or copying of
>> this message is strictly prohibited. If you have received this
>> communication in error, please notify us immediately, and delete
>> the original message.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>
>>
>>
>
>
> --
> James Stauffer
> Are you good? Take the test at http://www.livingwaters.com/good/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>
>
This message contains information that may be privileged or confidential
and is the property of the Capgemini Group. It is intended only for the
person to whom it is addressed. If you are not the intended recipient, you
are not authorized to read, print, retain, copy, disseminate, distribute,
or use this message or any part thereof. If you receive this message in
error, please notify the sender immediately and delete all copies of this
message.
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
Re: How to make log4j "environment-aware"
Posted by Nicolas De Loof <ni...@capgemini.com>.
To solve this I'm using a custom log4j.xml (with debugs enabled) and run
my app with
-Dlog4j.configuration=file:///D:/log4j.xml
Using this, I can configure log4j for production and have all the debugs
I need on my dev computer.
James Stauffer a écrit :
> Can you keep the config file out of the deployment?
>
> On 4/5/06, pantichd@firstenergycorp.com <pa...@firstenergycorp.com> wrote:
>
>> Hello,
>>
>> I'm fairly new to log4j so please excuse me if I'm asking a question that's
>> really basic. I've searched the archives but I haven't found something that
>> applies to my specific question.
>>
>> Is there a way to make log4j "environment aware"? By that I mean that it
>> would print debug messages if running on development but only error or
>> fatal messages on production.
>>
>> I've seen some messages that suggest creating separate log4j.properties
>> files for each environment. That would be a little difficult in our
>> environment. We are using SAP's Netweaver platform and it's "transport"
>> process. Once you've deployed your app to development there is no way to
>> modify the deployment before it goes to production. The only way would be
>> to manually go into the production server AFTER the deployment and change
>> the log4j.properties file. Obviously, that is undesirable!
>>
>> Thanks in advance for any help.
>>
>> David
>>
>>
>> -----------------------------------------
>> The information contained in this message is intended only for the
>> personal and confidential use of the recipient(s) named above. If
>> the reader of this message is not the intended recipient or an
>> agent responsible for delivering it to the intended recipient, you
>> are hereby notified that you have received this document in error
>> and that any review, dissemination, distribution, or copying of
>> this message is strictly prohibited. If you have received this
>> communication in error, please notify us immediately, and delete
>> the original message.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>>
>>
>>
>
>
> --
> James Stauffer
> Are you good? Take the test at http://www.livingwaters.com/good/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>
>
This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
Re: How to make log4j "environment-aware"
Posted by James Stauffer <st...@gmail.com>.
Can you keep the config file out of the deployment?
On 4/5/06, pantichd@firstenergycorp.com <pa...@firstenergycorp.com> wrote:
> Hello,
>
> I'm fairly new to log4j so please excuse me if I'm asking a question that's
> really basic. I've searched the archives but I haven't found something that
> applies to my specific question.
>
> Is there a way to make log4j "environment aware"? By that I mean that it
> would print debug messages if running on development but only error or
> fatal messages on production.
>
> I've seen some messages that suggest creating separate log4j.properties
> files for each environment. That would be a little difficult in our
> environment. We are using SAP's Netweaver platform and it's "transport"
> process. Once you've deployed your app to development there is no way to
> modify the deployment before it goes to production. The only way would be
> to manually go into the production server AFTER the deployment and change
> the log4j.properties file. Obviously, that is undesirable!
>
> Thanks in advance for any help.
>
> David
>
>
> -----------------------------------------
> The information contained in this message is intended only for the
> personal and confidential use of the recipient(s) named above. If
> the reader of this message is not the intended recipient or an
> agent responsible for delivering it to the intended recipient, you
> are hereby notified that you have received this document in error
> and that any review, dissemination, distribution, or copying of
> this message is strictly prohibited. If you have received this
> communication in error, please notify us immediately, and delete
> the original message.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>
--
James Stauffer
Are you good? Take the test at http://www.livingwaters.com/good/
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
How to make log4j "environment-aware"
Posted by pa...@firstenergycorp.com.
Hello,
I'm fairly new to log4j so please excuse me if I'm asking a question that's
really basic. I've searched the archives but I haven't found something that
applies to my specific question.
Is there a way to make log4j "environment aware"? By that I mean that it
would print debug messages if running on development but only error or
fatal messages on production.
I've seen some messages that suggest creating separate log4j.properties
files for each environment. That would be a little difficult in our
environment. We are using SAP's Netweaver platform and it's "transport"
process. Once you've deployed your app to development there is no way to
modify the deployment before it goes to production. The only way would be
to manually go into the production server AFTER the deployment and change
the log4j.properties file. Obviously, that is undesirable!
Thanks in advance for any help.
David
-----------------------------------------
The information contained in this message is intended only for the
personal and confidential use of the recipient(s) named above. If
the reader of this message is not the intended recipient or an
agent responsible for delivering it to the intended recipient, you
are hereby notified that you have received this document in error
and that any review, dissemination, distribution, or copying of
this message is strictly prohibited. If you have received this
communication in error, please notify us immediately, and delete
the original message.
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org