You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by Robert Koberg <ro...@koberg.com> on 2005/10/05 16:22:11 UTC

log warning using log4j LogChute

Hi,

I am using the latest velocity from SVN and log4j-1.2.12 in tomcat 
5.5.9. I am getting the following warning in my log file:

2005-10-05 10:08:09,553 INFO  [localhost].[/] -  Velocity   [warn] 
LogSystem has been deprecated. Please use a LogChute implementation.
2005-10-05 10:08:09,553 INFO  [localhost].[/] -  Velocity   [warn] 
LogSystem has been deprecated. Please use a LogChute implementation.

How do I use a LogChute implementation?

My velocity.properties specifies no logging information (I never have). 
Should I be? If LogSystem is deprecated, should the default be LogChute?

I tried setting the following in my velocity.properties to no avail:

runtime.log.logsystem = org.apache.velocity.runtime.log.Log4JLogChute

best,
-Rob

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org


Re: log warning using log4j LogChute

Posted by "Henning P. Schmiedehausen" <hp...@intermeta.de>.
"Will Glass-Husain" <wg...@forio.com> writes:

>Does this really have to be a WARN message?  Maybe it could be a DEBUG 
>message?

+1 Not DEBUG, INFO/NOTICE, because it is valid information for an user
and as long as LogSystem is not really slated for removal, WARN is not
necessary.

>Also, I suggest the message only appear once and not every time a log 
>message is sent.

+1.

	Best regards
		Henning

-- 
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen          INTERMETA GmbH
hps@intermeta.de        +49 9131 50 654 0   http://www.intermeta.de/

RedHat Certified Engineer -- Jakarta Turbine Development  -- hero for hire
   Linux, Java, perl, Solaris -- Consulting, Training, Development

		      4 - 8 - 15 - 16 - 23 - 42

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org


Re: log warning using log4j LogChute

Posted by Will Glass-Husain <wg...@forio.com>.
Does this really have to be a WARN message?  Maybe it could be a DEBUG 
message?

Also, I suggest the message only appear once and not every time a log 
message is sent.

It's not like using LogSystem really causes any real problems for the user. 
WARN seems overkill.

WILL

----- Original Message ----- 
From: "Nathan Bubna" <nb...@gmail.com>
To: "Velocity Developers List" <ve...@jakarta.apache.org>
Sent: Wednesday, October 05, 2005 8:29 AM
Subject: Re: log warning using log4j LogChute


are you perchance using VelocityTools when you get these?

On 10/5/05, Robert Koberg <ro...@koberg.com> wrote:
> Hi,
>
> I am using the latest velocity from SVN and log4j-1.2.12 in tomcat
> 5.5.9. I am getting the following warning in my log file:
>
> 2005-10-05 10:08:09,553 INFO  [localhost].[/] -  Velocity   [warn]
> LogSystem has been deprecated. Please use a LogChute implementation.
> 2005-10-05 10:08:09,553 INFO  [localhost].[/] -  Velocity   [warn]
> LogSystem has been deprecated. Please use a LogChute implementation.
>
> How do I use a LogChute implementation?
>
> My velocity.properties specifies no logging information (I never have).
> Should I be? If LogSystem is deprecated, should the default be LogChute?
>
> I tried setting the following in my velocity.properties to no avail:
>
> runtime.log.logsystem = org.apache.velocity.runtime.log.Log4JLogChute
>
> best,
> -Rob
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org


Re: log warning using log4j LogChute

Posted by Nathan Bubna <nb...@gmail.com>.
On 10/5/05, Robert Koberg <ro...@koberg.com> wrote:
> Nathan Bubna wrote:
> > are you perchance using VelocityTools when you get these?
>
> No. It is happening at startup (I will paste the log from the begining
> of tomcat start to where velocity loads the velocity.properties file,
> below).

the VelocityViewServlet is part of VelocityTools (i was referring to
the whole project :).  and it is the VelocityViewServlet that is
giving the deprecated LogSystem instance to Velocity proper.

so, like i said, you'll just have to ignore the warning (which
shouldn't really be a warning) until i (or someone else) adds LogChute
support to VelocityTools.  in the meantime, it shouldn't be a problem
for you at all.

>    <servlet>
>      <servlet-name>velocity</servlet-name>
>
> <servlet-class>org.apache.velocity.tools.view.servlet.VelocityViewServlet</servlet-class>
>      <init-param>
>        <param-name>org.apache.velocity.properties</param-name>
>        <param-value>/WEB-INF/velocity.properties</param-value>
>      </init-param>
>      <load-on-startup>1</load-on-startup>
>    </servlet>
>
>
>
> One thing that is weird is I am getting duplicate log entries. But that
> does not appear to be velocity related as tomcat lines are duplicated.

yeah, that's probably due to use of commons-logging in both Tomcat 5.5
and VelocityTools.  there's some problems with the use of
commons-logging in VelocityTools when running on Tomcat 5.5 because
they started running every bit of logging in Tomcat through
commons-logging.  so my VelocityTools hacks to connect commons-logging
and Velocity's logging stuff are more or less broken.

i'm not sure what to recommend at this time for that, except to avoid
the CommonsLogLogSystem and LogSystemCommonsLog that are in
VelocityTools.  if you aren't using either of those and are still
getting double messages, mabye it could be your log4j settings.  i
don't really know though.

> thanks,
> -Rob
>
>
> 2005-10-05 10:20:22,669 INFO  http11.Http11Protocol - Initializing
> Coyote HTTP/1.1 on http-8088
> 2005-10-05 10:20:22,687 INFO  startup.Catalina - Initialization
> processed in 3878 ms
> 2005-10-05 10:20:22,687 INFO  startup.Catalina - Initialization
> processed in 3878 ms
> 2005-10-05 10:20:22,772 INFO  core.StandardService - Starting service
> Catalina
> 2005-10-05 10:20:22,772 INFO  core.StandardService - Starting service
> Catalina
> 2005-10-05 10:20:22,801 INFO  core.StandardEngine - Starting Servlet
> Engine: Apache Tomcat/5.5.9
> 2005-10-05 10:20:22,801 INFO  core.StandardEngine - Starting Servlet
> Engine: Apache Tomcat/5.5.9
> 2005-10-05 10:20:22,823 INFO  core.StandardHost - XML validation enabled
> 2005-10-05 10:20:22,823 INFO  core.StandardHost - XML validation enabled
> 2005-10-05 10:20:30,675 INFO  [localhost].[/] -  Velocity   [warn]
> LogSystem has been deprecated. Please use a LogChute implementation.
> 2005-10-05 10:20:30,675 INFO  [localhost].[/] -  Velocity   [warn]
> LogSystem has been deprecated. Please use a LogChute implementation.
> 2005-10-05 10:20:30,676 INFO  [localhost].[/] -  Velocity   [info]
> VelocityViewServlet: Custom Properties File: /WEB-INF/velocity.properties
> 2005-10-05 10:20:30,676 INFO  [localhost].[/] -  Velocity   [info]
> VelocityViewServlet: Custom Properties File: /WEB-INF/velocity.properties
> 2005-10-05 10:20:30,676 INFO  [localhost].[/] -  Velocity   [info]
> **************************************************************
> 2005-10-05 10:20:30,676 INFO  [localhost].[/] -  Velocity   [info]
> **************************************************************
> 2005-10-05 10:20:30,676 INFO  [localhost].[/] -  Velocity   [info]
> Starting Jakarta Velocity v1.5-dev
> 2005-10-05 10:20:30,676 INFO  [localhost].[/] -  Velocity   [info]
> Starting Jakarta Velocity v1.5-dev
> 2005-10-05 10:20:30,677 INFO  [localhost].[/] -  Velocity   [info]
> RuntimeInstance initializing.
> 2005-10-05 10:20:30,677 INFO  [localhost].[/] -  Velocity   [info]
> RuntimeInstance initializing.
> 2005-10-05 10:20:30,677 INFO  [localhost].[/] -  Velocity   [info]
> Default Properties File:
> org/apache/velocity/runtime/defaults/velocity.properties
> 2005-10-05 10:20:30,677 INFO  [localhost].[/] -  Velocity   [info]
> Default Properties File:
> org/apache/velocity/runtime/defaults/velocity.properties
>
> >
> > On 10/5/05, Robert Koberg <ro...@koberg.com> wrote:
> >
> >>Hi,
> >>
> >>I am using the latest velocity from SVN and log4j-1.2.12 in tomcat
> >>5.5.9. I am getting the following warning in my log file:
> >>
> >>2005-10-05 10:08:09,553 INFO  [localhost].[/] -  Velocity   [warn]
> >>LogSystem has been deprecated. Please use a LogChute implementation.
> >>2005-10-05 10:08:09,553 INFO  [localhost].[/] -  Velocity   [warn]
> >>LogSystem has been deprecated. Please use a LogChute implementation.
> >>
> >>How do I use a LogChute implementation?
> >>
> >>My velocity.properties specifies no logging information (I never have).
> >>Should I be? If LogSystem is deprecated, should the default be LogChute?
> >>
> >>I tried setting the following in my velocity.properties to no avail:
> >>
> >>runtime.log.logsystem = org.apache.velocity.runtime.log.Log4JLogChute
> >>
> >>best,
> >>-Rob
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org


Re: log warning using log4j LogChute

Posted by Robert Koberg <ro...@koberg.com>.
Nathan Bubna wrote:
> are you perchance using VelocityTools when you get these?

No. It is happening at startup (I will paste the log from the begining 
of tomcat start to where velocity loads the velocity.properties file, 
below).


   <servlet>
     <servlet-name>velocity</servlet-name>
 
<servlet-class>org.apache.velocity.tools.view.servlet.VelocityViewServlet</servlet-class>
     <init-param>
       <param-name>org.apache.velocity.properties</param-name>
       <param-value>/WEB-INF/velocity.properties</param-value>
     </init-param>
     <load-on-startup>1</load-on-startup>
   </servlet>



One thing that is weird is I am getting duplicate log entries. But that 
does not appear to be velocity related as tomcat lines are duplicated.

thanks,
-Rob


2005-10-05 10:20:22,669 INFO  http11.Http11Protocol - Initializing 
Coyote HTTP/1.1 on http-8088
2005-10-05 10:20:22,687 INFO  startup.Catalina - Initialization 
processed in 3878 ms
2005-10-05 10:20:22,687 INFO  startup.Catalina - Initialization 
processed in 3878 ms
2005-10-05 10:20:22,772 INFO  core.StandardService - Starting service 
Catalina
2005-10-05 10:20:22,772 INFO  core.StandardService - Starting service 
Catalina
2005-10-05 10:20:22,801 INFO  core.StandardEngine - Starting Servlet 
Engine: Apache Tomcat/5.5.9
2005-10-05 10:20:22,801 INFO  core.StandardEngine - Starting Servlet 
Engine: Apache Tomcat/5.5.9
2005-10-05 10:20:22,823 INFO  core.StandardHost - XML validation enabled
2005-10-05 10:20:22,823 INFO  core.StandardHost - XML validation enabled
2005-10-05 10:20:30,675 INFO  [localhost].[/] -  Velocity   [warn] 
LogSystem has been deprecated. Please use a LogChute implementation.
2005-10-05 10:20:30,675 INFO  [localhost].[/] -  Velocity   [warn] 
LogSystem has been deprecated. Please use a LogChute implementation.
2005-10-05 10:20:30,676 INFO  [localhost].[/] -  Velocity   [info] 
VelocityViewServlet: Custom Properties File: /WEB-INF/velocity.properties
2005-10-05 10:20:30,676 INFO  [localhost].[/] -  Velocity   [info] 
VelocityViewServlet: Custom Properties File: /WEB-INF/velocity.properties
2005-10-05 10:20:30,676 INFO  [localhost].[/] -  Velocity   [info] 
**************************************************************
2005-10-05 10:20:30,676 INFO  [localhost].[/] -  Velocity   [info] 
**************************************************************
2005-10-05 10:20:30,676 INFO  [localhost].[/] -  Velocity   [info] 
Starting Jakarta Velocity v1.5-dev
2005-10-05 10:20:30,676 INFO  [localhost].[/] -  Velocity   [info] 
Starting Jakarta Velocity v1.5-dev
2005-10-05 10:20:30,677 INFO  [localhost].[/] -  Velocity   [info] 
RuntimeInstance initializing.
2005-10-05 10:20:30,677 INFO  [localhost].[/] -  Velocity   [info] 
RuntimeInstance initializing.
2005-10-05 10:20:30,677 INFO  [localhost].[/] -  Velocity   [info] 
Default Properties File: 
org/apache/velocity/runtime/defaults/velocity.properties
2005-10-05 10:20:30,677 INFO  [localhost].[/] -  Velocity   [info] 
Default Properties File: 
org/apache/velocity/runtime/defaults/velocity.properties

> 
> On 10/5/05, Robert Koberg <ro...@koberg.com> wrote:
> 
>>Hi,
>>
>>I am using the latest velocity from SVN and log4j-1.2.12 in tomcat
>>5.5.9. I am getting the following warning in my log file:
>>
>>2005-10-05 10:08:09,553 INFO  [localhost].[/] -  Velocity   [warn]
>>LogSystem has been deprecated. Please use a LogChute implementation.
>>2005-10-05 10:08:09,553 INFO  [localhost].[/] -  Velocity   [warn]
>>LogSystem has been deprecated. Please use a LogChute implementation.
>>
>>How do I use a LogChute implementation?
>>
>>My velocity.properties specifies no logging information (I never have).
>>Should I be? If LogSystem is deprecated, should the default be LogChute?
>>
>>I tried setting the following in my velocity.properties to no avail:
>>
>>runtime.log.logsystem = org.apache.velocity.runtime.log.Log4JLogChute
>>
>>best,
>>-Rob

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org


Re: log warning using log4j LogChute

Posted by Nathan Bubna <nb...@gmail.com>.
are you perchance using VelocityTools when you get these?

On 10/5/05, Robert Koberg <ro...@koberg.com> wrote:
> Hi,
>
> I am using the latest velocity from SVN and log4j-1.2.12 in tomcat
> 5.5.9. I am getting the following warning in my log file:
>
> 2005-10-05 10:08:09,553 INFO  [localhost].[/] -  Velocity   [warn]
> LogSystem has been deprecated. Please use a LogChute implementation.
> 2005-10-05 10:08:09,553 INFO  [localhost].[/] -  Velocity   [warn]
> LogSystem has been deprecated. Please use a LogChute implementation.
>
> How do I use a LogChute implementation?
>
> My velocity.properties specifies no logging information (I never have).
> Should I be? If LogSystem is deprecated, should the default be LogChute?
>
> I tried setting the following in my velocity.properties to no avail:
>
> runtime.log.logsystem = org.apache.velocity.runtime.log.Log4JLogChute
>
> best,
> -Rob
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org


Re: log warning using log4j LogChute

Posted by Robert Koberg <ro...@koberg.com>.
Nathan Bubna wrote:

> the runtime.log.logsystem property is for specifying an actual
> *instance* of a LogChute (or LogSystem, though that's deprecated).  to
> specify a class name, you should use the runtime.log.logsystem.class
> property.  but note that Velocity will first check the
> runtime.log.logsystem property for a LogChute/LogSystem before moving
> on to the class property.

OK. I used:


runtime.log.logsystem.class = org.apache.velocity.runtime.log.Log4JLogChute

and that it solved it for me. I haven't incorporated tools in yet - so 
no problem.

BTW, I like the amount of log lines written out much better now :)


thanks,
-Rob

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org


Re: log warning using log4j LogChute

Posted by Nathan Bubna <nb...@gmail.com>.
more info than my prematurely sent last email...

On 10/5/05, Robert Koberg <ro...@koberg.com> wrote:
> Hi,
>
> I am using the latest velocity from SVN and log4j-1.2.12 in tomcat
> 5.5.9. I am getting the following warning in my log file:
>
> 2005-10-05 10:08:09,553 INFO  [localhost].[/] -  Velocity   [warn]
> LogSystem has been deprecated. Please use a LogChute implementation.
> 2005-10-05 10:08:09,553 INFO  [localhost].[/] -  Velocity   [warn]
> LogSystem has been deprecated. Please use a LogChute implementation.
>
> How do I use a LogChute implementation?

see below...

> My velocity.properties specifies no logging information (I never have).
> Should I be? If LogSystem is deprecated, should the default be LogChute?

yep.  but if you're using VelocityTools, it has not yet been updated
to support LogChutes and will pass a LogSystem implementation to
Velocity.

> I tried setting the following in my velocity.properties to no avail:
>
> runtime.log.logsystem = org.apache.velocity.runtime.log.Log4JLogChute

the runtime.log.logsystem property is for specifying an actual
*instance* of a LogChute (or LogSystem, though that's deprecated).  to
specify a class name, you should use the runtime.log.logsystem.class
property.  but note that Velocity will first check the
runtime.log.logsystem property for a LogChute/LogSystem before moving
on to the class property.

so, if you are using VelocityTools, you'll just have to put up with
the deprecation warning until i add support for LogChute.  sorry 'bout
that, but really it won't hurt anything. :)

> best,
> -Rob
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-dev-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-dev-help@jakarta.apache.org