Re: log4j 1x usage in jsp.

2014-04-29 Thread Daniel Cruver
Did you follow the directions Tomcat provides for using Log4J 1.x? It provides 
directions specifically for replacing all logging. We have done this on our 
project.  One thing is that if you hot deploy and undeploy to a tomcat it might 
leave some things in memory. In production instances hot deployment might not 
be best. If you restart the Tomcat Webserver and not just the web applications 
I believe nothing should be left behind.

On Apr 29, 2014 9:06 PM, Remko Popma  wrote:
The manual page you quote is specifically for log4j-2.0.
Log4j-1.2 works differently and I don't think you can apply the 2.0 manual
to log4j-1.2.
If you cannot move to 2.0, I suggest simply using log4j-1.2 with your
application and take it from there. Don't worry about the 2.0 manual in
that case.

Remko


On Wed, Apr 30, 2014 at 7:51 AM, Gordon wrote:

> Hi,
>
> I understand the current version of log4j is 2.x, but our company using
> log4j 1.x and so my question is specific to version 1.x:
>
> It's said here
>
> http://logging.apache.org/log4j/2.x/manual/webapp.html
>
> that
>
> "You must take particular care when using Log4j or any other logging
> framework within a Java EE web application. It's important for logging
> resources to be properly cleaned up (database connections closed, files
> closed, etc.) when the container shuts down or the web application is
> undeployed. Because of the nature of class loaders within web applications,
> Log4j resources cannot be cleaned up through normal means. Log4j must be
> "started" when the web application deploys and "shut down" when the web
> application undeploys. How this works varies depending on whether your
> application is a Servlet 3.0 or
> newer >or
> Servlet
> 2.5  >web
> application."
>
> Questions:
> 1) How do I start Log4j?  Did I miss something?  Currently I'm using log
> for 4 in my jsp / java as follows:
>
> import or.apache.log4j.Logger;
> Logger log = Logger.getLogger("LoggerName");
> log.error("msg");
>
> 2) How do I "shut down" Log4j per above?  If there is a service call that I
> have to make before and after Tomcat gets started, I am not aware.
>
> 3) What if I don't start / shudown Log4J correctly, what files / resources
> will remain and where is the resource located and how do I clean up the
> resource?
>
> 4) Since can redeploy my web app, this means I can go in and delete the
> whole tomcat temp directory AND whatever resources (files) that log4j
> uses... so what's the concern?
>
> Thank you,
> Gordon
>


Re: log4j 1x usage in jsp.

2014-04-29 Thread Remko Popma
The manual page you quote is specifically for log4j-2.0.
Log4j-1.2 works differently and I don't think you can apply the 2.0 manual
to log4j-1.2.
If you cannot move to 2.0, I suggest simply using log4j-1.2 with your
application and take it from there. Don't worry about the 2.0 manual in
that case.

Remko


On Wed, Apr 30, 2014 at 7:51 AM, Gordon wrote:

> Hi,
>
> I understand the current version of log4j is 2.x, but our company using
> log4j 1.x and so my question is specific to version 1.x:
>
> It's said here
>
> http://logging.apache.org/log4j/2.x/manual/webapp.html
>
> that
>
> "You must take particular care when using Log4j or any other logging
> framework within a Java EE web application. It's important for logging
> resources to be properly cleaned up (database connections closed, files
> closed, etc.) when the container shuts down or the web application is
> undeployed. Because of the nature of class loaders within web applications,
> Log4j resources cannot be cleaned up through normal means. Log4j must be
> "started" when the web application deploys and "shut down" when the web
> application undeploys. How this works varies depending on whether your
> application is a Servlet 3.0 or
> newer >or
> Servlet
> 2.5  >web
> application."
>
> Questions:
> 1) How do I start Log4j?  Did I miss something?  Currently I'm using log
> for 4 in my jsp / java as follows:
>
> import or.apache.log4j.Logger;
> Logger log = Logger.getLogger("LoggerName");
> log.error("msg");
>
> 2) How do I "shut down" Log4j per above?  If there is a service call that I
> have to make before and after Tomcat gets started, I am not aware.
>
> 3) What if I don't start / shudown Log4J correctly, what files / resources
> will remain and where is the resource located and how do I clean up the
> resource?
>
> 4) Since can redeploy my web app, this means I can go in and delete the
> whole tomcat temp directory AND whatever resources (files) that log4j
> uses... so what's the concern?
>
> Thank you,
> Gordon
>


log4j 1x usage in jsp.

2014-04-29 Thread Gordon
Hi,

I understand the current version of log4j is 2.x, but our company using
log4j 1.x and so my question is specific to version 1.x:

It's said here

http://logging.apache.org/log4j/2.x/manual/webapp.html

that

"You must take particular care when using Log4j or any other logging
framework within a Java EE web application. It's important for logging
resources to be properly cleaned up (database connections closed, files
closed, etc.) when the container shuts down or the web application is
undeployed. Because of the nature of class loaders within web applications,
Log4j resources cannot be cleaned up through normal means. Log4j must be
"started" when the web application deploys and "shut down" when the web
application undeploys. How this works varies depending on whether your
application is a Servlet 3.0 or
neweror
Servlet
2.5 web
application."

Questions:
1) How do I start Log4j?  Did I miss something?  Currently I'm using log
for 4 in my jsp / java as follows:

import or.apache.log4j.Logger;
Logger log = Logger.getLogger("LoggerName");
log.error("msg");

2) How do I "shut down" Log4j per above?  If there is a service call that I
have to make before and after Tomcat gets started, I am not aware.

3) What if I don't start / shudown Log4J correctly, what files / resources
will remain and where is the resource located and how do I clean up the
resource?

4) Since can redeploy my web app, this means I can go in and delete the
whole tomcat temp directory AND whatever resources (files) that log4j
uses... so what's the concern?

Thank you,
Gordon


Re: maven build for source does not work

2014-04-29 Thread Matt Sicker
You can use 2.0. We're all working on that.


On 29 April 2014 08:53,  wrote:

> Dell - Internal Use - Confidential
> I would if I could, but I can't so I shan't...
>
> -Original Message-
> From: Remko Popma [mailto:remko.po...@gmail.com]
> Sent: Tuesday, April 29, 2014 8:32 AM
> To: Log4J Users List
> Subject: Re: maven build for source does not work
>
> Walter,
>
> It's open source though. Nothing stops you from helping out.
>
> Best regards,
> Remko
>
> Sent from my iPhone
>
> > On 2014/04/29, at 22:24, wrote:
> >
> > Dell - Internal Use - Confidential
> > What? No maintenance on the latest released source?
> >
> > -Original Message-
> > From: Scott Deboy [mailto:scott.de...@gmail.com]
> > Sent: Monday, April 28, 2014 6:46 PM
> > To: Log4J Users List
> > Subject: Re: maven build for source does not work
> >
> > It is not true that we don't maintain 1.2 any longer. If important
> issues are found we may still address them even though we are focused on
> Log4j2.
> >> On Apr 28, 2014 4:01 PM, "Matt Sicker" wrote:
> >>
> >> We don't maintain 1.2.x anymore. Also, I think you're supposed to use
> >> ant to build 1.2.
> >>
> >> Please check out Log4j 2.0, though, as we're preparing to release
> >> that and would like feedback.
> >>
> >>
> >>> On 28 April 2014 14:30, wrote:
> >>>
> >>> Dell - Internal Use - Confidential
> >>>
> >>>
> >>> 1) The pom file has to be updated to allow for maven-site-plugin 3.3
> >>> rather than 3.1
> >>>
> >>> 2) The mvm staging step gives a null pointer exception
> >>>
> >>> Apache.log4j-1.2.17
> >>>
> >>> Thanks
> >>>
> >>> Walter
> >>
> >>
> >>
> >> --
> >> Matt Sicker
> >>
>
> -
> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
> For additional commands, e-mail: log4j-user-h...@logging.apache.org
>



-- 
Matt Sicker 


RE: maven build for source does not work

2014-04-29 Thread Walter_Marvin
Dell - Internal Use - Confidential
I would if I could, but I can't so I shan't...

-Original Message-
From: Remko Popma [mailto:remko.po...@gmail.com]
Sent: Tuesday, April 29, 2014 8:32 AM
To: Log4J Users List
Subject: Re: maven build for source does not work

Walter,

It's open source though. Nothing stops you from helping out.

Best regards,
Remko

Sent from my iPhone

> On 2014/04/29, at 22:24, wrote:
>
> Dell - Internal Use - Confidential
> What? No maintenance on the latest released source?
>
> -Original Message-
> From: Scott Deboy [mailto:scott.de...@gmail.com]
> Sent: Monday, April 28, 2014 6:46 PM
> To: Log4J Users List
> Subject: Re: maven build for source does not work
>
> It is not true that we don't maintain 1.2 any longer. If important issues are 
> found we may still address them even though we are focused on Log4j2.
>> On Apr 28, 2014 4:01 PM, "Matt Sicker" wrote:
>>
>> We don't maintain 1.2.x anymore. Also, I think you're supposed to use
>> ant to build 1.2.
>>
>> Please check out Log4j 2.0, though, as we're preparing to release
>> that and would like feedback.
>>
>>
>>> On 28 April 2014 14:30, wrote:
>>>
>>> Dell - Internal Use - Confidential
>>>
>>>
>>> 1) The pom file has to be updated to allow for maven-site-plugin 3.3
>>> rather than 3.1
>>>
>>> 2) The mvm staging step gives a null pointer exception
>>>
>>> Apache.log4j-1.2.17
>>>
>>> Thanks
>>>
>>> Walter
>>
>>
>>
>> --
>> Matt Sicker
>>

-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org


Re: maven build for source does not work

2014-04-29 Thread Remko Popma
Walter,

It's open source though. Nothing stops you from helping out. 

Best regards,
Remko

Sent from my iPhone

> On 2014/04/29, at 22:24,  wrote:
> 
> Dell - Internal Use - Confidential
> What? No maintenance on the latest released source?
> 
> -Original Message-
> From: Scott Deboy [mailto:scott.de...@gmail.com]
> Sent: Monday, April 28, 2014 6:46 PM
> To: Log4J Users List
> Subject: Re: maven build for source does not work
> 
> It is not true that we don't maintain 1.2 any longer. If important issues are 
> found we may still address them even though we are focused on Log4j2.
>> On Apr 28, 2014 4:01 PM, "Matt Sicker" wrote:
>> 
>> We don't maintain 1.2.x anymore. Also, I think you're supposed to use
>> ant to build 1.2.
>> 
>> Please check out Log4j 2.0, though, as we're preparing to release that
>> and would like feedback.
>> 
>> 
>>> On 28 April 2014 14:30, wrote:
>>> 
>>> Dell - Internal Use - Confidential
>>> 
>>> 
>>> 1) The pom file has to be updated to allow for maven-site-plugin 3.3
>>> rather than 3.1
>>> 
>>> 2) The mvm staging step gives a null pointer exception
>>> 
>>> Apache.log4j-1.2.17
>>> 
>>> Thanks
>>> 
>>> Walter
>> 
>> 
>> 
>> --
>> Matt Sicker
>> 

-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org



RE: maven build for source does not work

2014-04-29 Thread Walter_Marvin
Dell - Internal Use - Confidential
What? No maintenance on the latest released source?

-Original Message-
From: Scott Deboy [mailto:scott.de...@gmail.com]
Sent: Monday, April 28, 2014 6:46 PM
To: Log4J Users List
Subject: Re: maven build for source does not work

It is not true that we don't maintain 1.2 any longer. If important issues are 
found we may still address them even though we are focused on Log4j2.
On Apr 28, 2014 4:01 PM, "Matt Sicker" wrote:

> We don't maintain 1.2.x anymore. Also, I think you're supposed to use
> ant to build 1.2.
>
> Please check out Log4j 2.0, though, as we're preparing to release that
> and would like feedback.
>
>
> On 28 April 2014 14:30, wrote:
>
> > Dell - Internal Use - Confidential
> >
> >
> > 1) The pom file has to be updated to allow for maven-site-plugin 3.3
> > rather than 3.1
> >
> > 2) The mvm staging step gives a null pointer exception
> >
> > Apache.log4j-1.2.17
> >
> > Thanks
> >
> > Walter
> >
>
>
>
> --
> Matt Sicker
>


RE: maven build for source does not work

2014-04-29 Thread Walter_Marvin
Dell - Internal Use - Confidential
What no maintenance on the latest RELEASED source?

-Original Message-
From: Matt Sicker [mailto:boa...@gmail.com]
Sent: Monday, April 28, 2014 6:01 PM
To: Log4J Users List
Subject: Re: maven build for source does not work

We don't maintain 1.2.x anymore. Also, I think you're supposed to use ant to 
build 1.2.

Please check out Log4j 2.0, though, as we're preparing to release that and 
would like feedback.


On 28 April 2014 14:30, wrote:

> Dell - Internal Use - Confidential
>
>
> 1) The pom file has to be updated to allow for maven-site-plugin 3.3
> rather than 3.1
>
> 2) The mvm staging step gives a null pointer exception
>
> Apache.log4j-1.2.17
>
> Thanks
>
> Walter
>



--
Matt Sicker