You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by David Wynter <da...@roamware.co.uk> on 2003/06/25 12:00:15 UTC

T2.3 dev logging setup

Hi,

I have tried both standard log4j.props seen in the Service how to on the
T2.3 dev website and the log4j.props as provided in the T2.3 CVS head and
both times I get

log4j:WARN No appenders could be found for logger
(org.apache.turbine.Turbine).
log4j:WARN Please initialize the log4j system properly.

Here is the latter of the two are:

#
# Currently, we use Log4J for all Torque, Fulcrum and Stratum logging
#
log4j.category.org.apache.stratum.component.ComponentLoader = ALL,
org.apache.stratum.component.ComponentLoader
log4j.appender.org.apache.stratum.component.ComponentLoader =
org.apache.log4j.FileAppender
log4j.appender.org.apache.stratum.component.ComponentLoader.file =
./logs/turbine.log
log4j.appender.org.apache.stratum.component.ComponentLoader.layout =
org.apache.log4j.PatternLayout
log4j.appender.org.apache.stratum.component.ComponentLoader.layout.conversio
nPattern = %d [%t] %-5p %c - %m%n
log4j.appender.org.apache.stratum.component.ComponentLoader.append = false

log4j.category.org.apache.torque = ALL, org.apache.torque
log4j.appender.org.apache.torque = org.apache.log4j.FileAppender
log4j.appender.org.apache.torque.file = ./logs/turbine.log
log4j.appender.org.apache.torque.layout = org.apache.log4j.PatternLayout
log4j.appender.org.apache.torque.layout.conversionPattern = %d [%t] %-5p %c-
%m%n
log4j.appender.org.apache.torque.append = false

log4j.category.org.apache.fulcrum = ALL, org.apache.fulcrum
log4j.appender.org.apache.fulcrum = org.apache.log4j.FileAppender
log4j.appender.org.apache.fulcrum.file = ./logs/turbine.log
log4j.appender.org.apache.fulcrum.layout = org.apache.log4j.PatternLayout
log4j.appender.org.apache.fulcrum.layout.conversionPattern = %d [%t] %-5p
%c- %m%n
log4j.appender.org.apache.fulcrum.append = false

I also tried it with the full path to the log file specified, same result.
Checked the log4j docs and can see nothing wrong with this setup. Ideas
anyone?

David


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


RE: Setting up T2.3 dev

Posted by David Wynter <da...@roamware.co.uk>.
Thanks Henning,

Fair enough, I had had good luck with building the T2.3-dev at first and
then got caught out with the later build. Using Eclipse to build it is just
another way of me trying to understand the problem. You see I really want to
start trying out the Avalon support, that is what is motivating me. Ah the
dilemma!

regards,

David

-----Original Message-----
From: Henning P. Schmiedehausen [mailto:hps@intermeta.de]
Sent: 04 July 2003 12:29
To: turbine-user@jakarta.apache.org
Subject: Re: Setting up T2.3 dev


"David Wynter" <da...@roamware.co.uk> writes:

David,

there is only one officially supported way to build the Turbine jar. This
is with maven. If you try with Eclipse, you're on your own.

>[ERROR] TEST org.apache.turbine.ConfigurationTest FAILED

This one is to expect if you read the developer list. It is a test which
fails with a newer commons-configuration jar. Unfortunately, the author
(Eric Pugh) isn't around ATM (I think he's currently moving). I will remove
this test from the RC1.

>And the category symbol is still not resolved when I refresh the project in
>eclipse, but weirdly this does not seem to occur when I use Maven to build
>the T2.3-dev project with "maven jar"?.

We don't support Eclipse. End of story. If you read my mail about the
torque generated peers, you would know, why.

Sorry to be rough on you but as you have noticed, there is some trouble
with the maven build tool and the torque versions. If you throw in a third,
no supported component, trouble is to be expected.

I will build the 2.3-RC1 on the weekend and we will have a binary (jar)
download for this.

>This is getting way too complicated to work out what is wrong here. I am
>really regretting changing my project to use T2.3-dev now.

That's why it is called "-dev". :-)

	Regards
		Henning

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

Java, perl, Solaris, Linux, xSP Consulting, Web Services
freelance consultant -- Jakarta Turbine Development  -- hero for hire

--- Quote of the week: "It is pointless to tell people anything when
you know that they won't process the message." --- Jonathan Revusky

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


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


Re: Setting up T2.3 dev

Posted by "Henning P. Schmiedehausen" <hp...@intermeta.de>.
"David Wynter" <da...@roamware.co.uk> writes:

David,

there is only one officially supported way to build the Turbine jar. This
is with maven. If you try with Eclipse, you're on your own.

>[ERROR] TEST org.apache.turbine.ConfigurationTest FAILED

This one is to expect if you read the developer list. It is a test which
fails with a newer commons-configuration jar. Unfortunately, the author
(Eric Pugh) isn't around ATM (I think he's currently moving). I will remove
this test from the RC1.

>And the category symbol is still not resolved when I refresh the project in
>eclipse, but weirdly this does not seem to occur when I use Maven to build
>the T2.3-dev project with "maven jar"?.

We don't support Eclipse. End of story. If you read my mail about the
torque generated peers, you would know, why.

Sorry to be rough on you but as you have noticed, there is some trouble
with the maven build tool and the torque versions. If you throw in a third,
no supported component, trouble is to be expected.

I will build the 2.3-RC1 on the weekend and we will have a binary (jar)
download for this. 

>This is getting way too complicated to work out what is wrong here. I am
>really regretting changing my project to use T2.3-dev now.

That's why it is called "-dev". :-)

	Regards
		Henning

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

Java, perl, Solaris, Linux, xSP Consulting, Web Services 
freelance consultant -- Jakarta Turbine Development  -- hero for hire

--- Quote of the week: "It is pointless to tell people anything when
you know that they won't process the message." --- Jonathan Revusky

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


RE: Setting up T2.3 dev

Posted by David Wynter <da...@roamware.co.uk>.
Bill,

Ran through all the steps successfully ( assume step 5 refers to the
project.xml in $MAVEN_HOME/plugins/maven-torque-plugin-3.1/project.xml )
except the last step, turbine will not compile it still fails the same 3
tests as before.

[ERROR] TEST org.apache.turbine.ConfigurationTest FAILED
[ERROR] TEST org.apache.turbine.services.schedule.JobEntryTest FAILED
[ERROR] TEST
org.apache.turbine.services.schedule.TurbineNonPersistentSchedulerServiceTes
t FAILED

Only the first of these leaves any evidence of what is wrong.

Testcase: testConfigurationValuesInSameOrder took 0.461 sec
	FAILED
expected:<FactoryService.classname> but was:<ComponentService.earlyInit>
junit.framework.AssertionFailedError: expected:<FactoryService.classname>
but was:<ComponentService.earlyInit>
	at
org.apache.turbine.ConfigurationTest.testConfigurationValuesInSameOrder(Conf
igurationTest.java:193)

And the category symbol is still not resolved when I refresh the project in
eclipse, but weirdly this does not seem to occur when I use Maven to build
the T2.3-dev project with "maven jar"?.

This is getting way too complicated to work out what is wrong here. I am
really regretting changing my project to use T2.3-dev now.

David

-----Original Message-----
From: Bill [mailto:bhalpin@collaborativefusion.com]
Sent: 03 July 2003 14:31
To: Turbine Users List
Subject: Re: Setting up T2.3 dev


David

I'm having similar problems.  This is what I believe you need to do fix
the generator problem:

1.  Checkout Torque HEAD from cvs
2.  cd to db-torque/src/generator
3.  run 'maven jar'
4.  cp db-torque/src/generator/target/torque-gen-3.1-alpha3-dev.jar to
$MAVEN_HOME/repository/torque/jars/
5.  Change the version entry in your dependency from 20030327.070220 to
3.1-alpha3-dev
6.  cd db-torque/src/generator/src/maven-plugin
7.  run 'maven plugin:install'
8.  rebuild turbine

I'm still getting errors at this point, but they are not the category
errors I was experiencing previously.  Let me know if this works for
you, that'll confirm my suspicion that my current errors are a
misconfiguration issue.

-b

On Thu, 2003-07-03 at 07:07, David Wynter wrote:
> Hi,
>
> I saw the message about the 'category' refernece getting created by a
Torque
> 3.0 generator and then the compile by the Torque 3.1 aplha1 causing the
> unresolvable problem. I checked my project.xml for the maven torque plugin
> and it has
>
>     <dependency>
>       <groupId>torque</groupId>
>       <artifactId>torque-gen</artifactId>
>       <version>20030327.070220</version>
>       <properties>
>         <classloader>root</classloader>
>       </properties>
>     </dependency>
>
> I am just not sure what I need to do with maven to bring this up to date.
> Also I could not find a newer version of the torque generator? any clues
on
> how I fix this problem?
>
> Thanks
>
> David
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
--
Bill <bh...@collaborativefusion.com>


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


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


Re: Setting up T2.3 dev

Posted by Bill <bh...@collaborativefusion.com>.
David

I'm having similar problems.  This is what I believe you need to do fix
the generator problem:

1.  Checkout Torque HEAD from cvs
2.  cd to db-torque/src/generator
3.  run 'maven jar'
4.  cp db-torque/src/generator/target/torque-gen-3.1-alpha3-dev.jar to
$MAVEN_HOME/repository/torque/jars/
5.  Change the version entry in your dependency from 20030327.070220 to
3.1-alpha3-dev
6.  cd db-torque/src/generator/src/maven-plugin
7.  run 'maven plugin:install'
8.  rebuild turbine

I'm still getting errors at this point, but they are not the category
errors I was experiencing previously.  Let me know if this works for
you, that'll confirm my suspicion that my current errors are a
misconfiguration issue.

-b  

On Thu, 2003-07-03 at 07:07, David Wynter wrote:
> Hi,
> 
> I saw the message about the 'category' refernece getting created by a Torque
> 3.0 generator and then the compile by the Torque 3.1 aplha1 causing the
> unresolvable problem. I checked my project.xml for the maven torque plugin
> and it has
> 
>     <dependency>
>       <groupId>torque</groupId>
>       <artifactId>torque-gen</artifactId>
>       <version>20030327.070220</version>
>       <properties>
>         <classloader>root</classloader>
>       </properties>
>     </dependency>
> 
> I am just not sure what I need to do with maven to bring this up to date.
> Also I could not find a newer version of the torque generator? any clues on
> how I fix this problem?
> 
> Thanks
> 
> David
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
-- 
Bill <bh...@collaborativefusion.com>


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


RE: Setting up T2.3 dev

Posted by David Wynter <da...@roamware.co.uk>.
I should also mention that I got the latest from head, I deleted the
generated security classes to get them to regenerate then ran "maven jar"
and got 3 failures during the tests

[ERROR] TEST org.apache.turbine.ConfigurationTest FAILED
[ERROR] TEST org.apache.turbine.services.schedule.JobEntryTest FAILED
[ERROR] TEST
org.apache.turbine.services.schedule.TurbineNonPersistentSchedulerServiceTes
t FAILED

Lots of warnings and errors in th emaven.log but that doesn't seem to be
related to this problem.

Regards

David

-----Original Message-----
From: David Wynter [mailto:david@roamware.co.uk]
Sent: 03 July 2003 12:08
To: Turbine Users List
Subject: Setting up T2.3 dev


Hi,

I saw the message about the 'category' refernece getting created by a Torque
3.0 generator and then the compile by the Torque 3.1 aplha1 causing the
unresolvable problem. I checked my project.xml for the maven torque plugin
and it has

    <dependency>
      <groupId>torque</groupId>
      <artifactId>torque-gen</artifactId>
      <version>20030327.070220</version>
      <properties>
        <classloader>root</classloader>
      </properties>
    </dependency>

I am just not sure what I need to do with maven to bring this up to date.
Also I could not find a newer version of the torque generator? any clues on
how I fix this problem?

Thanks

David


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


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


Setting up T2.3 dev

Posted by David Wynter <da...@roamware.co.uk>.
Hi,

I saw the message about the 'category' refernece getting created by a Torque
3.0 generator and then the compile by the Torque 3.1 aplha1 causing the
unresolvable problem. I checked my project.xml for the maven torque plugin
and it has

    <dependency>
      <groupId>torque</groupId>
      <artifactId>torque-gen</artifactId>
      <version>20030327.070220</version>
      <properties>
        <classloader>root</classloader>
      </properties>
    </dependency>

I am just not sure what I need to do with maven to bring this up to date.
Also I could not find a newer version of the torque generator? any clues on
how I fix this problem?

Thanks

David


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


Re: T2.3 dev logging setup

Posted by "Henning P. Schmiedehausen" <hp...@intermeta.de>.
"David Wynter" <da...@roamware.co.uk> writes:

>Hi,

Duh! What was I smoking when I wrote that code?

I cleaned this up a bit, this should be better now.

	Regards
		Henning




>I have T2.3-dev source now attached under Eclpise and I can see that I get
>the following error message:

>log4j:WARN No appenders could be found for logger
>(org.apache.turbine.Turbine).
>log4j:WARN Please initialize the log4j system properly.

>When it hits the last line of the code below from Turbine.java (line 357)

>        //
>        // Set up logging as soon as possible
>        //
>        String log4jFile = configuration.getString(LOG4J_CONFIG_FILE,

>LOG4J_CONFIG_FILE_DEFAULT);

>        log4jFile = getRealPath(log4jFile);

>        log.debug("Loading Log4J configuration from " + log4jFile);

>It seems to me that it has read the path for the log4j props file and before
>loading the properties attempts to write to the log. Am I missing something
>here?

>I tried the very latest T2.3-dev from CVS (had been working on one 2 week
>sold) and what looks like a bunch of log calls (although shown as
>"category.error("Could not initialize Peer", e);" and similar) are failing
>to be resolved in the Torque generated security peers when compiled from
>Eclipse (yes I did do the various targets for Torque Scheduler/Security peer
>generation & prepare-source). Also 3 test failures, [ERROR] TEST
>org.apache.turbine.ConfigurationTest FAILED, [ERROR] TEST
>org.apache.turbine.services.schedule.JobEntryTest FAILED and [ERROR] TEST
>org.apache.turbine.services.schedule.TurbineNonPersistentSchedulerServiceTes
>t FAILED

>I have a deadline so will revert back to T2.2 TDK I think.

>Regards

>David

>-----Original Message-----
>From: David Wynter [mailto:david@roamware.co.uk]
>Sent: 28 June 2003 11:37
>To: Turbine Users List; hps@intermeta.de
>Subject: RE: T2.3 dev logging setup


>Hi,

>Actually it is Turbine not Torque that seems to be calling for this appender
>before it is setup. Do I have to early init something in TR.props maybe?

>Rgds.

>David

>-----Original Message-----
>From: Henning P. Schmiedehausen [mailto:hps@intermeta.de]
>Sent: 27 June 2003 21:51
>To: turbine-user@jakarta.apache.org
>Subject: Re: T2.3 dev logging setup


>"David Wynter" <da...@roamware.co.uk> writes:

>>Hi Henning,

>Hi,

>that's strange. Getting this error means, that Torque tried to log
>something before the first time the turbine servlet ran. Setting up
>the logger for all classes (including torque) is really the first
>thing we do when starting Turbine up.

>Sorry to be so vague. Can you tell us more about your environment
>(Servlet runner, JDK and so on). As this thread is called "T2.3 dev
>logging setup", I'm assuming that you're using 2.3-dev .

>	Regards
>		Henning


>>I get it at run-time. I have 2 projects under what was my TDK2.2
>directory's
>>webapp directorys. I have replaced the full set of files under WEB-INF\lib
>>with those for T2.3 dev. I have updated the TR.props and used the
>>log4j.props file you gave me. I have made all the changes in the Wiki on
>>migrating from T2.2 to T2.3.

>>When I set up the log4j.props to be identical for each of the 2 projects I
>>have then I get 2 sets of error messages. When I leave one of the
>>log4j.props as an empty file then I only get one set of error messages. So
>>it is these instances starting up that are causing the problem.

>>I looked up the FAQ at Log4J and it says of this error message:-

>>"Log4j does not have a default logging target. It is the user's
>>responsibility to ensure that all categories can inherit an appender. This
>>can be easily achieved by attaching an appender to the root category."

>>And yet here is the top part of the log4j.properties

>>log4j.rootLogger = INFO, turbine

>>So then I removed all traces of the turbine appender and replaced it with
>>"Default", the whole log4j.props shown



>># Currently, we use Log4J for all logging
>>#
>>#
>># If we don't know the logging facility, put it into the
>># turbine.log
>>#
>>log4j.rootLogger = DEBUG, Default

>># Setup Default Appender
>>log4j.appender.Default=org.apache.log4j.RollingFileAppender
>>log4j.appender.Default.File=default.log
>>log4j.appender.Default.MaxFileSize=2000KB
>>log4j.appender.Default.MaxBackupIndex=5
>>log4j.appender.Default.layout=org.apache.log4j.PatternLayout
>>log4j.appender.Default.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss}
>>[%-5p] %c{1} - %m%n

>>I get exactly the same error message as before! Which makes nme think itis
>>the way the Turbine code is calling a fro an appender, Th elog4j.properties
>>refers to "log4j.category.org.apache.turbine = INFO, turbine" the error
>>messase refers to log4j.category.org.apache.turbine.Turbine", note th
>>eTurbine on the end.

>>So now I am a little confused about how the LogFactory works. If I have

>>public class EntityListTool implements ApplicationTool {
>>    static {
>>        final Log sLogger = LogFactory.getLog(EntityListTool.class);
>>    }
>>....

>>where it is com.stpenable.stpsite.util.pulltool.EntityListTool

>>I'd expect I needed a entry in log4j.props as shown

>>#
>># turbine.log
>>#
>>log4j.category.com.stpenable.stpsite.util.pulltool.EntityListTool = INFO,
>>EntityListTool
>>log4j.additivity.org.apache.EntityListTool = falselog4j.appender.turbine =
>>org.apache.log4j.FileAppender
>>log4j.appender.EntityListTool .file = ${applicationRoot}/logs/turbine.log
>>log4j.appender.EntityListTool .layout = org.apache.log4j.PatternLayout
>>log4j.appender.EntityListTool .layout.conversionPattern = %d [%t] %-5p %c -
>>%m%n
>>log4j.appender.EntityListTool .append = false

>>Is that correct?

>>If it is then shouldn't the turbine log4j.props entry be

>>log4j.category.org.apache.turbine.Turbine = INFO, turbine
>>log4j.additivity.org.apache.turbine.Turbine = false
>>log4j.appender.turbine = org.apache.log4j.FileAppender
>>log4j.appender.turbine.file = ${applicationRoot}/logs/turbine.log
>>log4j.appender.turbine.layout = org.apache.log4j.PatternLayout
>>log4j.appender.turbine.layout.conversionPattern = %d [%t] %-5p %c - %m%n
>>log4j.appender.turbine.append = false

>>????

>>Thanks

>>David

>>-----Original Message-----
>>From: Henning P. Schmiedehausen [mailto:hps@intermeta.de]
>>Sent: 26 June 2003 09:06
>>To: turbine-user@jakarta.apache.org
>>Subject: Re: T2.3 dev logging setup


>>"David Wynter" <da...@roamware.co.uk> writes:

>>Do you get this warning at _run_time or at _compile_time?

>>	Regards
>>		Henning





>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: turbine-user-help@jakarta.apache.org

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

>Java, perl, Solaris, Linux, xSP Consulting, Web Services
>freelance consultant -- Jakarta Turbine Development  -- hero for hire

>--- Quote of the week: "It is pointless to tell people anything when
>you know that they won't process the message." --- Jonathan Revusky

>---------------------------------------------------------------------
>To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: turbine-user-help@jakarta.apache.org


>---------------------------------------------------------------------
>To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: turbine-user-help@jakarta.apache.org


>---------------------------------------------------------------------
>To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: turbine-user-help@jakarta.apache.org

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

Java, perl, Solaris, Linux, xSP Consulting, Web Services 
freelance consultant -- Jakarta Turbine Development  -- hero for hire

--- Quote of the week: "It is pointless to tell people anything when
you know that they won't process the message." --- Jonathan Revusky

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


RE: T2.3 dev logging setup

Posted by David Wynter <da...@roamware.co.uk>.
I should point out that now logging is working because after that use of log
the properties are setup and I do get the log files as specified in th
elog4j.properties file. So it is just the error message that is annoying.

I was still getting the NullPointerException but it say line 688

java.lang.NullPointerException
	at org.apache.turbine.Turbine.doGet(Turbine.java:688)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)

But now cannot debug this due to the other problems I am having compiling
the latest T2.3-dev from CVS

gds,

David

-----Original Message-----
From: David Wynter [mailto:david@roamware.co.uk]
Sent: 02 July 2003 15:17
To: Turbine Users List
Subject: RE: T2.3 dev logging setup


Hi,

I have T2.3-dev source now attached under Eclipse and I can see that I get
the following error message:

log4j:WARN No appenders could be found for logger
(org.apache.turbine.Turbine).
log4j:WARN Please initialize the log4j system properly.

When it hits the last line of the code below from Turbine.java (line 357)

        //
        // Set up logging as soon as possible
        //
        String log4jFile = configuration.getString(LOG4J_CONFIG_FILE,

LOG4J_CONFIG_FILE_DEFAULT);

        log4jFile = getRealPath(log4jFile);

        log.debug("Loading Log4J configuration from " + log4jFile);

It seems to me that it has read the path for the log4j props file and before
loading the properties attempts to write to the log. Am I missing something
here?

I then tried the very latest T2.3-dev from CVS (had been working on one 2
weeks old) and what looks like a bunch of log calls (although shown as
"category.error("Could not initialize Peer", e);" and similar) are failing
to be resolved in the Torque generated security peers when compiled from
Eclipse (yes I did do the various targets for Torque Scheduler/Security peer
generation & prepare-source). Also 3 test failures, [ERROR] TEST
org.apache.turbine.ConfigurationTest FAILED, [ERROR] TEST
org.apache.turbine.services.schedule.JobEntryTest FAILED and [ERROR] TEST
org.apache.turbine.services.schedule.TurbineNonPersistentSchedulerServiceTes
t FAILED

I have a deadline so will revert back to T2.2 TDK I think.

Regards

David

-----Original Message-----
From: David Wynter [mailto:david@roamware.co.uk]
Sent: 28 June 2003 11:37
To: Turbine Users List; hps@intermeta.de
Subject: RE: T2.3 dev logging setup


Hi,

Actually it is Turbine not Torque that seems to be calling for this appender
before it is setup. Do I have to early init something in TR.props maybe?

Rgds.

David

-----Original Message-----
From: Henning P. Schmiedehausen [mailto:hps@intermeta.de]
Sent: 27 June 2003 21:51
To: turbine-user@jakarta.apache.org
Subject: Re: T2.3 dev logging setup


"David Wynter" <da...@roamware.co.uk> writes:

>Hi Henning,

Hi,

that's strange. Getting this error means, that Torque tried to log
something before the first time the turbine servlet ran. Setting up
the logger for all classes (including torque) is really the first
thing we do when starting Turbine up.

Sorry to be so vague. Can you tell us more about your environment
(Servlet runner, JDK and so on). As this thread is called "T2.3 dev
logging setup", I'm assuming that you're using 2.3-dev .

	Regards
		Henning


>I get it at run-time. I have 2 projects under what was my TDK2.2
directory's
>webapp directorys. I have replaced the full set of files under WEB-INF\lib
>with those for T2.3 dev. I have updated the TR.props and used the
>log4j.props file you gave me. I have made all the changes in the Wiki on
>migrating from T2.2 to T2.3.

>When I set up the log4j.props to be identical for each of the 2 projects I
>have then I get 2 sets of error messages. When I leave one of the
>log4j.props as an empty file then I only get one set of error messages. So
>it is these instances starting up that are causing the problem.

>I looked up the FAQ at Log4J and it says of this error message:-

>"Log4j does not have a default logging target. It is the user's
>responsibility to ensure that all categories can inherit an appender. This
>can be easily achieved by attaching an appender to the root category."

>And yet here is the top part of the log4j.properties

>log4j.rootLogger = INFO, turbine

>So then I removed all traces of the turbine appender and replaced it with
>"Default", the whole log4j.props shown



># Currently, we use Log4J for all logging
>#
>#
># If we don't know the logging facility, put it into the
># turbine.log
>#
>log4j.rootLogger = DEBUG, Default

># Setup Default Appender
>log4j.appender.Default=org.apache.log4j.RollingFileAppender
>log4j.appender.Default.File=default.log
>log4j.appender.Default.MaxFileSize=2000KB
>log4j.appender.Default.MaxBackupIndex=5
>log4j.appender.Default.layout=org.apache.log4j.PatternLayout
>log4j.appender.Default.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss}
>[%-5p] %c{1} - %m%n

>I get exactly the same error message as before! Which makes nme think itis
>the way the Turbine code is calling a fro an appender, Th elog4j.properties
>refers to "log4j.category.org.apache.turbine = INFO, turbine" the error
>messase refers to log4j.category.org.apache.turbine.Turbine", note th
>eTurbine on the end.

>So now I am a little confused about how the LogFactory works. If I have

>public class EntityListTool implements ApplicationTool {
>    static {
>        final Log sLogger = LogFactory.getLog(EntityListTool.class);
>    }
>....

>where it is com.stpenable.stpsite.util.pulltool.EntityListTool

>I'd expect I needed a entry in log4j.props as shown

>#
># turbine.log
>#
>log4j.category.com.stpenable.stpsite.util.pulltool.EntityListTool = INFO,
>EntityListTool
>log4j.additivity.org.apache.EntityListTool = falselog4j.appender.turbine =
>org.apache.log4j.FileAppender
>log4j.appender.EntityListTool .file = ${applicationRoot}/logs/turbine.log
>log4j.appender.EntityListTool .layout = org.apache.log4j.PatternLayout
>log4j.appender.EntityListTool .layout.conversionPattern = %d [%t] %-5p %c -
>%m%n
>log4j.appender.EntityListTool .append = false

>Is that correct?

>If it is then shouldn't the turbine log4j.props entry be

>log4j.category.org.apache.turbine.Turbine = INFO, turbine
>log4j.additivity.org.apache.turbine.Turbine = false
>log4j.appender.turbine = org.apache.log4j.FileAppender
>log4j.appender.turbine.file = ${applicationRoot}/logs/turbine.log
>log4j.appender.turbine.layout = org.apache.log4j.PatternLayout
>log4j.appender.turbine.layout.conversionPattern = %d [%t] %-5p %c - %m%n
>log4j.appender.turbine.append = false

>????

>Thanks

>David

>-----Original Message-----
>From: Henning P. Schmiedehausen [mailto:hps@intermeta.de]
>Sent: 26 June 2003 09:06
>To: turbine-user@jakarta.apache.org
>Subject: Re: T2.3 dev logging setup


>"David Wynter" <da...@roamware.co.uk> writes:

>Do you get this warning at _run_time or at _compile_time?

>	Regards
>		Henning





>---------------------------------------------------------------------
>To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: turbine-user-help@jakarta.apache.org

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

Java, perl, Solaris, Linux, xSP Consulting, Web Services
freelance consultant -- Jakarta Turbine Development  -- hero for hire

--- Quote of the week: "It is pointless to tell people anything when
you know that they won't process the message." --- Jonathan Revusky

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


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


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


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


RE: T2.3 dev logging setup

Posted by David Wynter <da...@roamware.co.uk>.
Hi,

I have T2.3-dev source now attached under Eclpise and I can see that I get
the following error message:

log4j:WARN No appenders could be found for logger
(org.apache.turbine.Turbine).
log4j:WARN Please initialize the log4j system properly.

When it hits the last line of the code below from Turbine.java (line 357)

        //
        // Set up logging as soon as possible
        //
        String log4jFile = configuration.getString(LOG4J_CONFIG_FILE,

LOG4J_CONFIG_FILE_DEFAULT);

        log4jFile = getRealPath(log4jFile);

        log.debug("Loading Log4J configuration from " + log4jFile);

It seems to me that it has read the path for the log4j props file and before
loading the properties attempts to write to the log. Am I missing something
here?

I tried the very latest T2.3-dev from CVS (had been working on one 2 week
sold) and what looks like a bunch of log calls (although shown as
"category.error("Could not initialize Peer", e);" and similar) are failing
to be resolved in the Torque generated security peers when compiled from
Eclipse (yes I did do the various targets for Torque Scheduler/Security peer
generation & prepare-source). Also 3 test failures, [ERROR] TEST
org.apache.turbine.ConfigurationTest FAILED, [ERROR] TEST
org.apache.turbine.services.schedule.JobEntryTest FAILED and [ERROR] TEST
org.apache.turbine.services.schedule.TurbineNonPersistentSchedulerServiceTes
t FAILED

I have a deadline so will revert back to T2.2 TDK I think.

Regards

David

-----Original Message-----
From: David Wynter [mailto:david@roamware.co.uk]
Sent: 28 June 2003 11:37
To: Turbine Users List; hps@intermeta.de
Subject: RE: T2.3 dev logging setup


Hi,

Actually it is Turbine not Torque that seems to be calling for this appender
before it is setup. Do I have to early init something in TR.props maybe?

Rgds.

David

-----Original Message-----
From: Henning P. Schmiedehausen [mailto:hps@intermeta.de]
Sent: 27 June 2003 21:51
To: turbine-user@jakarta.apache.org
Subject: Re: T2.3 dev logging setup


"David Wynter" <da...@roamware.co.uk> writes:

>Hi Henning,

Hi,

that's strange. Getting this error means, that Torque tried to log
something before the first time the turbine servlet ran. Setting up
the logger for all classes (including torque) is really the first
thing we do when starting Turbine up.

Sorry to be so vague. Can you tell us more about your environment
(Servlet runner, JDK and so on). As this thread is called "T2.3 dev
logging setup", I'm assuming that you're using 2.3-dev .

	Regards
		Henning


>I get it at run-time. I have 2 projects under what was my TDK2.2
directory's
>webapp directorys. I have replaced the full set of files under WEB-INF\lib
>with those for T2.3 dev. I have updated the TR.props and used the
>log4j.props file you gave me. I have made all the changes in the Wiki on
>migrating from T2.2 to T2.3.

>When I set up the log4j.props to be identical for each of the 2 projects I
>have then I get 2 sets of error messages. When I leave one of the
>log4j.props as an empty file then I only get one set of error messages. So
>it is these instances starting up that are causing the problem.

>I looked up the FAQ at Log4J and it says of this error message:-

>"Log4j does not have a default logging target. It is the user's
>responsibility to ensure that all categories can inherit an appender. This
>can be easily achieved by attaching an appender to the root category."

>And yet here is the top part of the log4j.properties

>log4j.rootLogger = INFO, turbine

>So then I removed all traces of the turbine appender and replaced it with
>"Default", the whole log4j.props shown



># Currently, we use Log4J for all logging
>#
>#
># If we don't know the logging facility, put it into the
># turbine.log
>#
>log4j.rootLogger = DEBUG, Default

># Setup Default Appender
>log4j.appender.Default=org.apache.log4j.RollingFileAppender
>log4j.appender.Default.File=default.log
>log4j.appender.Default.MaxFileSize=2000KB
>log4j.appender.Default.MaxBackupIndex=5
>log4j.appender.Default.layout=org.apache.log4j.PatternLayout
>log4j.appender.Default.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss}
>[%-5p] %c{1} - %m%n

>I get exactly the same error message as before! Which makes nme think itis
>the way the Turbine code is calling a fro an appender, Th elog4j.properties
>refers to "log4j.category.org.apache.turbine = INFO, turbine" the error
>messase refers to log4j.category.org.apache.turbine.Turbine", note th
>eTurbine on the end.

>So now I am a little confused about how the LogFactory works. If I have

>public class EntityListTool implements ApplicationTool {
>    static {
>        final Log sLogger = LogFactory.getLog(EntityListTool.class);
>    }
>....

>where it is com.stpenable.stpsite.util.pulltool.EntityListTool

>I'd expect I needed a entry in log4j.props as shown

>#
># turbine.log
>#
>log4j.category.com.stpenable.stpsite.util.pulltool.EntityListTool = INFO,
>EntityListTool
>log4j.additivity.org.apache.EntityListTool = falselog4j.appender.turbine =
>org.apache.log4j.FileAppender
>log4j.appender.EntityListTool .file = ${applicationRoot}/logs/turbine.log
>log4j.appender.EntityListTool .layout = org.apache.log4j.PatternLayout
>log4j.appender.EntityListTool .layout.conversionPattern = %d [%t] %-5p %c -
>%m%n
>log4j.appender.EntityListTool .append = false

>Is that correct?

>If it is then shouldn't the turbine log4j.props entry be

>log4j.category.org.apache.turbine.Turbine = INFO, turbine
>log4j.additivity.org.apache.turbine.Turbine = false
>log4j.appender.turbine = org.apache.log4j.FileAppender
>log4j.appender.turbine.file = ${applicationRoot}/logs/turbine.log
>log4j.appender.turbine.layout = org.apache.log4j.PatternLayout
>log4j.appender.turbine.layout.conversionPattern = %d [%t] %-5p %c - %m%n
>log4j.appender.turbine.append = false

>????

>Thanks

>David

>-----Original Message-----
>From: Henning P. Schmiedehausen [mailto:hps@intermeta.de]
>Sent: 26 June 2003 09:06
>To: turbine-user@jakarta.apache.org
>Subject: Re: T2.3 dev logging setup


>"David Wynter" <da...@roamware.co.uk> writes:

>Do you get this warning at _run_time or at _compile_time?

>	Regards
>		Henning





>---------------------------------------------------------------------
>To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: turbine-user-help@jakarta.apache.org

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

Java, perl, Solaris, Linux, xSP Consulting, Web Services
freelance consultant -- Jakarta Turbine Development  -- hero for hire

--- Quote of the week: "It is pointless to tell people anything when
you know that they won't process the message." --- Jonathan Revusky

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


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


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


RE: T2.3 dev logging setup

Posted by David Wynter <da...@roamware.co.uk>.
Hi,

Actually it is Turbine not Torque that seems to be calling for this appender
before it is setup. Do I have to early init something in TR.props maybe?

Rgds.

David

-----Original Message-----
From: Henning P. Schmiedehausen [mailto:hps@intermeta.de]
Sent: 27 June 2003 21:51
To: turbine-user@jakarta.apache.org
Subject: Re: T2.3 dev logging setup


"David Wynter" <da...@roamware.co.uk> writes:

>Hi Henning,

Hi,

that's strange. Getting this error means, that Torque tried to log
something before the first time the turbine servlet ran. Setting up
the logger for all classes (including torque) is really the first
thing we do when starting Turbine up.

Sorry to be so vague. Can you tell us more about your environment
(Servlet runner, JDK and so on). As this thread is called "T2.3 dev
logging setup", I'm assuming that you're using 2.3-dev .

	Regards
		Henning


>I get it at run-time. I have 2 projects under what was my TDK2.2
directory's
>webapp directorys. I have replaced the full set of files under WEB-INF\lib
>with those for T2.3 dev. I have updated the TR.props and used the
>log4j.props file you gave me. I have made all the changes in the Wiki on
>migrating from T2.2 to T2.3.

>When I set up the log4j.props to be identical for each of the 2 projects I
>have then I get 2 sets of error messages. When I leave one of the
>log4j.props as an empty file then I only get one set of error messages. So
>it is these instances starting up that are causing the problem.

>I looked up the FAQ at Log4J and it says of this error message:-

>"Log4j does not have a default logging target. It is the user's
>responsibility to ensure that all categories can inherit an appender. This
>can be easily achieved by attaching an appender to the root category."

>And yet here is the top part of the log4j.properties

>log4j.rootLogger = INFO, turbine

>So then I removed all traces of the turbine appender and replaced it with
>"Default", the whole log4j.props shown



># Currently, we use Log4J for all logging
>#
>#
># If we don't know the logging facility, put it into the
># turbine.log
>#
>log4j.rootLogger = DEBUG, Default

># Setup Default Appender
>log4j.appender.Default=org.apache.log4j.RollingFileAppender
>log4j.appender.Default.File=default.log
>log4j.appender.Default.MaxFileSize=2000KB
>log4j.appender.Default.MaxBackupIndex=5
>log4j.appender.Default.layout=org.apache.log4j.PatternLayout
>log4j.appender.Default.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss}
>[%-5p] %c{1} - %m%n

>I get exactly the same error message as before! Which makes nme think itis
>the way the Turbine code is calling a fro an appender, Th elog4j.properties
>refers to "log4j.category.org.apache.turbine = INFO, turbine" the error
>messase refers to log4j.category.org.apache.turbine.Turbine", note th
>eTurbine on the end.

>So now I am a little confused about how the LogFactory works. If I have

>public class EntityListTool implements ApplicationTool {
>    static {
>        final Log sLogger = LogFactory.getLog(EntityListTool.class);
>    }
>....

>where it is com.stpenable.stpsite.util.pulltool.EntityListTool

>I'd expect I needed a entry in log4j.props as shown

>#
># turbine.log
>#
>log4j.category.com.stpenable.stpsite.util.pulltool.EntityListTool = INFO,
>EntityListTool
>log4j.additivity.org.apache.EntityListTool = falselog4j.appender.turbine =
>org.apache.log4j.FileAppender
>log4j.appender.EntityListTool .file = ${applicationRoot}/logs/turbine.log
>log4j.appender.EntityListTool .layout = org.apache.log4j.PatternLayout
>log4j.appender.EntityListTool .layout.conversionPattern = %d [%t] %-5p %c -
>%m%n
>log4j.appender.EntityListTool .append = false

>Is that correct?

>If it is then shouldn't the turbine log4j.props entry be

>log4j.category.org.apache.turbine.Turbine = INFO, turbine
>log4j.additivity.org.apache.turbine.Turbine = false
>log4j.appender.turbine = org.apache.log4j.FileAppender
>log4j.appender.turbine.file = ${applicationRoot}/logs/turbine.log
>log4j.appender.turbine.layout = org.apache.log4j.PatternLayout
>log4j.appender.turbine.layout.conversionPattern = %d [%t] %-5p %c - %m%n
>log4j.appender.turbine.append = false

>????

>Thanks

>David

>-----Original Message-----
>From: Henning P. Schmiedehausen [mailto:hps@intermeta.de]
>Sent: 26 June 2003 09:06
>To: turbine-user@jakarta.apache.org
>Subject: Re: T2.3 dev logging setup


>"David Wynter" <da...@roamware.co.uk> writes:

>Do you get this warning at _run_time or at _compile_time?

>	Regards
>		Henning





>---------------------------------------------------------------------
>To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: turbine-user-help@jakarta.apache.org

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

Java, perl, Solaris, Linux, xSP Consulting, Web Services
freelance consultant -- Jakarta Turbine Development  -- hero for hire

--- Quote of the week: "It is pointless to tell people anything when
you know that they won't process the message." --- Jonathan Revusky

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


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


Re: T2.3 dev logging setup

Posted by "Henning P. Schmiedehausen" <hp...@intermeta.de>.
"David Wynter" <da...@roamware.co.uk> writes:

>Hi Henning,

Hi,

that's strange. Getting this error means, that Torque tried to log
something before the first time the turbine servlet ran. Setting up
the logger for all classes (including torque) is really the first
thing we do when starting Turbine up.

Sorry to be so vague. Can you tell us more about your environment
(Servlet runner, JDK and so on). As this thread is called "T2.3 dev
logging setup", I'm assuming that you're using 2.3-dev .

	Regards
		Henning


>I get it at run-time. I have 2 projects under what was my TDK2.2 directory's
>webapp directorys. I have replaced the full set of files under WEB-INF\lib
>with those for T2.3 dev. I have updated the TR.props and used the
>log4j.props file you gave me. I have made all the changes in the Wiki on
>migrating from T2.2 to T2.3.

>When I set up the log4j.props to be identical for each of the 2 projects I
>have then I get 2 sets of error messages. When I leave one of the
>log4j.props as an empty file then I only get one set of error messages. So
>it is these instances starting up that are causing the problem.

>I looked up the FAQ at Log4J and it says of this error message:-

>"Log4j does not have a default logging target. It is the user's
>responsibility to ensure that all categories can inherit an appender. This
>can be easily achieved by attaching an appender to the root category."

>And yet here is the top part of the log4j.properties

>log4j.rootLogger = INFO, turbine

>So then I removed all traces of the turbine appender and replaced it with
>"Default", the whole log4j.props shown



># Currently, we use Log4J for all logging
>#
>#
># If we don't know the logging facility, put it into the
># turbine.log
>#
>log4j.rootLogger = DEBUG, Default

># Setup Default Appender
>log4j.appender.Default=org.apache.log4j.RollingFileAppender
>log4j.appender.Default.File=default.log
>log4j.appender.Default.MaxFileSize=2000KB
>log4j.appender.Default.MaxBackupIndex=5
>log4j.appender.Default.layout=org.apache.log4j.PatternLayout
>log4j.appender.Default.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss}
>[%-5p] %c{1} - %m%n

>I get exactly the same error message as before! Which makes nme think itis
>the way the Turbine code is calling a fro an appender, Th elog4j.properties
>refers to "log4j.category.org.apache.turbine = INFO, turbine" the error
>messase refers to log4j.category.org.apache.turbine.Turbine", note th
>eTurbine on the end.

>So now I am a little confused about how the LogFactory works. If I have

>public class EntityListTool implements ApplicationTool {
>    static {
>        final Log sLogger = LogFactory.getLog(EntityListTool.class);
>    }
>....

>where it is com.stpenable.stpsite.util.pulltool.EntityListTool

>I'd expect I needed a entry in log4j.props as shown

>#
># turbine.log
>#
>log4j.category.com.stpenable.stpsite.util.pulltool.EntityListTool = INFO,
>EntityListTool
>log4j.additivity.org.apache.EntityListTool = falselog4j.appender.turbine =
>org.apache.log4j.FileAppender
>log4j.appender.EntityListTool .file = ${applicationRoot}/logs/turbine.log
>log4j.appender.EntityListTool .layout = org.apache.log4j.PatternLayout
>log4j.appender.EntityListTool .layout.conversionPattern = %d [%t] %-5p %c -
>%m%n
>log4j.appender.EntityListTool .append = false

>Is that correct?

>If it is then shouldn't the turbine log4j.props entry be

>log4j.category.org.apache.turbine.Turbine = INFO, turbine
>log4j.additivity.org.apache.turbine.Turbine = false
>log4j.appender.turbine = org.apache.log4j.FileAppender
>log4j.appender.turbine.file = ${applicationRoot}/logs/turbine.log
>log4j.appender.turbine.layout = org.apache.log4j.PatternLayout
>log4j.appender.turbine.layout.conversionPattern = %d [%t] %-5p %c - %m%n
>log4j.appender.turbine.append = false

>????

>Thanks

>David

>-----Original Message-----
>From: Henning P. Schmiedehausen [mailto:hps@intermeta.de]
>Sent: 26 June 2003 09:06
>To: turbine-user@jakarta.apache.org
>Subject: Re: T2.3 dev logging setup


>"David Wynter" <da...@roamware.co.uk> writes:

>Do you get this warning at _run_time or at _compile_time?

>	Regards
>		Henning





>---------------------------------------------------------------------
>To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: turbine-user-help@jakarta.apache.org

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

Java, perl, Solaris, Linux, xSP Consulting, Web Services 
freelance consultant -- Jakarta Turbine Development  -- hero for hire

--- Quote of the week: "It is pointless to tell people anything when
you know that they won't process the message." --- Jonathan Revusky

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


RE: T2.3 dev logging setup

Posted by David Wynter <da...@roamware.co.uk>.
Hi Henning,

I get it at run-time. I have 2 projects under what was my TDK2.2 directory's
webapp directorys. I have replaced the full set of files under WEB-INF\lib
with those for T2.3 dev. I have updated the TR.props and used the
log4j.props file you gave me. I have made all the changes in the Wiki on
migrating from T2.2 to T2.3.

When I set up the log4j.props to be identical for each of the 2 projects I
have then I get 2 sets of error messages. When I leave one of the
log4j.props as an empty file then I only get one set of error messages. So
it is these instances starting up that are causing the problem.

I looked up the FAQ at Log4J and it says of this error message:-

"Log4j does not have a default logging target. It is the user's
responsibility to ensure that all categories can inherit an appender. This
can be easily achieved by attaching an appender to the root category."

And yet here is the top part of the log4j.properties

log4j.rootLogger = INFO, turbine

So then I removed all traces of the turbine appender and replaced it with
"Default", the whole log4j.props shown



# Currently, we use Log4J for all logging
#
#
# If we don't know the logging facility, put it into the
# turbine.log
#
log4j.rootLogger = DEBUG, Default

# Setup Default Appender
log4j.appender.Default=org.apache.log4j.RollingFileAppender
log4j.appender.Default.File=default.log
log4j.appender.Default.MaxFileSize=2000KB
log4j.appender.Default.MaxBackupIndex=5
log4j.appender.Default.layout=org.apache.log4j.PatternLayout
log4j.appender.Default.layout.ConversionPattern=%d{dd MMM yyyy HH:mm:ss}
[%-5p] %c{1} - %m%n

I get exactly the same error message as before! Which makes nme think itis
the way the Turbine code is calling a fro an appender, Th elog4j.properties
refers to "log4j.category.org.apache.turbine = INFO, turbine" the error
messase refers to log4j.category.org.apache.turbine.Turbine", note th
eTurbine on the end.

So now I am a little confused about how the LogFactory works. If I have

public class EntityListTool implements ApplicationTool {
    static {
        final Log sLogger = LogFactory.getLog(EntityListTool.class);
    }
....

where it is com.stpenable.stpsite.util.pulltool.EntityListTool

I'd expect I needed a entry in log4j.props as shown

#
# turbine.log
#
log4j.category.com.stpenable.stpsite.util.pulltool.EntityListTool = INFO,
EntityListTool
log4j.additivity.org.apache.EntityListTool = falselog4j.appender.turbine =
org.apache.log4j.FileAppender
log4j.appender.EntityListTool .file = ${applicationRoot}/logs/turbine.log
log4j.appender.EntityListTool .layout = org.apache.log4j.PatternLayout
log4j.appender.EntityListTool .layout.conversionPattern = %d [%t] %-5p %c -
%m%n
log4j.appender.EntityListTool .append = false

Is that correct?

If it is then shouldn't the turbine log4j.props entry be

log4j.category.org.apache.turbine.Turbine = INFO, turbine
log4j.additivity.org.apache.turbine.Turbine = false
log4j.appender.turbine = org.apache.log4j.FileAppender
log4j.appender.turbine.file = ${applicationRoot}/logs/turbine.log
log4j.appender.turbine.layout = org.apache.log4j.PatternLayout
log4j.appender.turbine.layout.conversionPattern = %d [%t] %-5p %c - %m%n
log4j.appender.turbine.append = false

????

Thanks

David

-----Original Message-----
From: Henning P. Schmiedehausen [mailto:hps@intermeta.de]
Sent: 26 June 2003 09:06
To: turbine-user@jakarta.apache.org
Subject: Re: T2.3 dev logging setup


"David Wynter" <da...@roamware.co.uk> writes:

Do you get this warning at _run_time or at _compile_time?

	Regards
		Henning





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


Re: T2.3 dev logging setup

Posted by "Henning P. Schmiedehausen" <hp...@intermeta.de>.
"David Wynter" <da...@roamware.co.uk> writes:

Do you get this warning at _run_time or at _compile_time?

	Regards
		Henning



>Hi Henning,

>Copied your log4j.properties verbatim into my /conf directory and still get
>this error message. Checked my TR.props has
>"log4j.file = /WEB-INF/conf/Log4j.properties"

>log4j:WARN No appenders could be found for logger
>(org.apache.turbine.Turbine).
>log4j:WARN Please initialize the log4j system properly.

>Do I have to write some code to handle an appender? Is there something else?

>Rgds.

>David

>-----Original Message-----
>From: Henning P. Schmiedehausen [mailto:hps@intermeta.de]
>Sent: 25 June 2003 12:57
>To: turbine-user@jakarta.apache.org
>Subject: Re: T2.3 dev logging setup


>"David Wynter" <da...@roamware.co.uk> writes:

>>Hi,

>>I have tried both standard log4j.props seen in the Service how to on the
>>T2.3 dev website and the log4j.props as provided in the T2.3 CVS head and
>>both times I get

>Here is my trustworthy old log4j.properties file, which works for me
>with the 2.3-dev as long as I use the log4j stuff:

>--- cut ---
># ------------------------------------------------------------------------
>#
># Logging Configuration
>#
># $Id: Log4j.properties,v 1.3 2003/06/20 00:10:22 henning Exp $
>#
># ------------------------------------------------------------------------

>#
># If we don't know the logging facility, put it into the
># turbine.log
>#
>log4j.rootLogger = INFO, turbine

>#
># Turbine goes into Turbine Log
>#
>log4j.category.org.apache.turbine = INFO, turbine
>log4j.additivity.org.apache.turbine = false

>#
># Torque has its own log file
>#
>log4j.category.org.apache.torque = INFO, torque
>log4j.additivity.org.apache.torque = false

>#
># Velocity Logfile
>#
>log4j.category.velocity = INFO, velocity
>log4j.additivity.velocity = false

>#
># Avalon Logfile
>#
>log4j.category.avalon = INFO, avalon
>log4j.additivity.avalon = false

>#
># Scheduler Category
>#
>log4j.category.scheduler = INFO, scheduler
>log4j.additivity.scheduler = false

>########################################################################
>#
># Logfile definitions
>#
>########################################################################

>#
># turbine.log
>#
>log4j.appender.turbine = org.apache.log4j.FileAppender
>log4j.appender.turbine.file = ${applicationRoot}/logs/turbine.log
>log4j.appender.turbine.layout = org.apache.log4j.PatternLayout
>log4j.appender.turbine.layout.conversionPattern = %d [%t] %-5p %c - %m%n
>log4j.appender.turbine.append = false

>#
># torque.log
>#
>log4j.appender.torque = org.apache.log4j.FileAppender
>log4j.appender.torque.file = ${applicationRoot}/logs/torque.log
>log4j.appender.torque.layout = org.apache.log4j.PatternLayout
>log4j.appender.torque.layout.conversionPattern = %d [%t] %-5p %c - %m%n
>log4j.appender.torque.append = false

>#
># Scheduler Output
>#
>log4j.appender.scheduler = org.apache.log4j.FileAppender
>log4j.appender.scheduler.file = ${applicationRoot}/logs/scheduler.log
>log4j.appender.scheduler.layout = org.apache.log4j.PatternLayout
>log4j.appender.scheduler.layout.conversionPattern = %d [%t] %-5p %c - %m%n
>log4j.appender.scheduler.append = false

>#
># Velocity gets configured to write its output onto the velocity
># category.
>#
>log4j.appender.velocity = org.apache.log4j.FileAppender
>log4j.appender.velocity.file = ${applicationRoot}/logs/velocity.log
>log4j.appender.velocity.layout = org.apache.log4j.PatternLayout
>log4j.appender.velocity.layout.conversionPattern = %d [%t] %-5p %c - %m%n
>log4j.appender.velocity.append = false

>#
># Avalon gets configured to write its output onto the avalon
># category.
>#
>log4j.appender.avalon = org.apache.log4j.FileAppender
>log4j.appender.avalon.file = ${applicationRoot}/logs/avalon.log
>log4j.appender.avalon.layout = org.apache.log4j.PatternLayout
>log4j.appender.avalon.layout.conversionPattern = %d [%t] %-5p %c - %m%n
>log4j.appender.avalon.append = false
>--- cut ---

>This is, BTW exactly the same file that is in the turbine HEAD
>CVS as conf/Log4j.properties.

>In the TR.props file, logging is only one line:


>--- cut ---
>log4j.file = /WEB-INF/conf/Log4j.properties
>--- cut ---

>	Regards
>		Henning

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

>Java, perl, Solaris, Linux, xSP Consulting, Web Services
>freelance consultant -- Jakarta Turbine Development  -- hero for hire

>--- Quote of the week: "It is pointless to tell people anything when
>you know that they won't process the message." --- Jonathan Revusky

>---------------------------------------------------------------------
>To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: turbine-user-help@jakarta.apache.org


>---------------------------------------------------------------------
>To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: turbine-user-help@jakarta.apache.org

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

Java, perl, Solaris, Linux, xSP Consulting, Web Services 
freelance consultant -- Jakarta Turbine Development  -- hero for hire

--- Quote of the week: "It is pointless to tell people anything when
you know that they won't process the message." --- Jonathan Revusky

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


RE: T2.3 dev logging setup

Posted by David Wynter <da...@roamware.co.uk>.
Hi Henning,

Copied your log4j.properties verbatim into my /conf directory and still get
this error message. Checked my TR.props has
"log4j.file = /WEB-INF/conf/Log4j.properties"

log4j:WARN No appenders could be found for logger
(org.apache.turbine.Turbine).
log4j:WARN Please initialize the log4j system properly.

Do I have to write some code to handle an appender? Is there something else?

Rgds.

David

-----Original Message-----
From: Henning P. Schmiedehausen [mailto:hps@intermeta.de]
Sent: 25 June 2003 12:57
To: turbine-user@jakarta.apache.org
Subject: Re: T2.3 dev logging setup


"David Wynter" <da...@roamware.co.uk> writes:

>Hi,

>I have tried both standard log4j.props seen in the Service how to on the
>T2.3 dev website and the log4j.props as provided in the T2.3 CVS head and
>both times I get

Here is my trustworthy old log4j.properties file, which works for me
with the 2.3-dev as long as I use the log4j stuff:

--- cut ---
# ------------------------------------------------------------------------
#
# Logging Configuration
#
# $Id: Log4j.properties,v 1.3 2003/06/20 00:10:22 henning Exp $
#
# ------------------------------------------------------------------------

#
# If we don't know the logging facility, put it into the
# turbine.log
#
log4j.rootLogger = INFO, turbine

#
# Turbine goes into Turbine Log
#
log4j.category.org.apache.turbine = INFO, turbine
log4j.additivity.org.apache.turbine = false

#
# Torque has its own log file
#
log4j.category.org.apache.torque = INFO, torque
log4j.additivity.org.apache.torque = false

#
# Velocity Logfile
#
log4j.category.velocity = INFO, velocity
log4j.additivity.velocity = false

#
# Avalon Logfile
#
log4j.category.avalon = INFO, avalon
log4j.additivity.avalon = false

#
# Scheduler Category
#
log4j.category.scheduler = INFO, scheduler
log4j.additivity.scheduler = false

########################################################################
#
# Logfile definitions
#
########################################################################

#
# turbine.log
#
log4j.appender.turbine = org.apache.log4j.FileAppender
log4j.appender.turbine.file = ${applicationRoot}/logs/turbine.log
log4j.appender.turbine.layout = org.apache.log4j.PatternLayout
log4j.appender.turbine.layout.conversionPattern = %d [%t] %-5p %c - %m%n
log4j.appender.turbine.append = false

#
# torque.log
#
log4j.appender.torque = org.apache.log4j.FileAppender
log4j.appender.torque.file = ${applicationRoot}/logs/torque.log
log4j.appender.torque.layout = org.apache.log4j.PatternLayout
log4j.appender.torque.layout.conversionPattern = %d [%t] %-5p %c - %m%n
log4j.appender.torque.append = false

#
# Scheduler Output
#
log4j.appender.scheduler = org.apache.log4j.FileAppender
log4j.appender.scheduler.file = ${applicationRoot}/logs/scheduler.log
log4j.appender.scheduler.layout = org.apache.log4j.PatternLayout
log4j.appender.scheduler.layout.conversionPattern = %d [%t] %-5p %c - %m%n
log4j.appender.scheduler.append = false

#
# Velocity gets configured to write its output onto the velocity
# category.
#
log4j.appender.velocity = org.apache.log4j.FileAppender
log4j.appender.velocity.file = ${applicationRoot}/logs/velocity.log
log4j.appender.velocity.layout = org.apache.log4j.PatternLayout
log4j.appender.velocity.layout.conversionPattern = %d [%t] %-5p %c - %m%n
log4j.appender.velocity.append = false

#
# Avalon gets configured to write its output onto the avalon
# category.
#
log4j.appender.avalon = org.apache.log4j.FileAppender
log4j.appender.avalon.file = ${applicationRoot}/logs/avalon.log
log4j.appender.avalon.layout = org.apache.log4j.PatternLayout
log4j.appender.avalon.layout.conversionPattern = %d [%t] %-5p %c - %m%n
log4j.appender.avalon.append = false
--- cut ---

This is, BTW exactly the same file that is in the turbine HEAD
CVS as conf/Log4j.properties.

In the TR.props file, logging is only one line:


--- cut ---
log4j.file = /WEB-INF/conf/Log4j.properties
--- cut ---

	Regards
		Henning

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

Java, perl, Solaris, Linux, xSP Consulting, Web Services
freelance consultant -- Jakarta Turbine Development  -- hero for hire

--- Quote of the week: "It is pointless to tell people anything when
you know that they won't process the message." --- Jonathan Revusky

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


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


Re: T2.3 dev logging setup

Posted by "Henning P. Schmiedehausen" <hp...@intermeta.de>.
"David Wynter" <da...@roamware.co.uk> writes:

>Hi,

>I have tried both standard log4j.props seen in the Service how to on the
>T2.3 dev website and the log4j.props as provided in the T2.3 CVS head and
>both times I get

Here is my trustworthy old log4j.properties file, which works for me
with the 2.3-dev as long as I use the log4j stuff:

--- cut ---
# ------------------------------------------------------------------------
#
# Logging Configuration
#
# $Id: Log4j.properties,v 1.3 2003/06/20 00:10:22 henning Exp $
#
# ------------------------------------------------------------------------

#
# If we don't know the logging facility, put it into the
# turbine.log
#
log4j.rootLogger = INFO, turbine

#
# Turbine goes into Turbine Log
#
log4j.category.org.apache.turbine = INFO, turbine
log4j.additivity.org.apache.turbine = false

#
# Torque has its own log file
#
log4j.category.org.apache.torque = INFO, torque
log4j.additivity.org.apache.torque = false

#
# Velocity Logfile
#
log4j.category.velocity = INFO, velocity
log4j.additivity.velocity = false

#
# Avalon Logfile
#
log4j.category.avalon = INFO, avalon
log4j.additivity.avalon = false

#
# Scheduler Category
#
log4j.category.scheduler = INFO, scheduler
log4j.additivity.scheduler = false

########################################################################
#
# Logfile definitions
#
########################################################################

#
# turbine.log
#
log4j.appender.turbine = org.apache.log4j.FileAppender
log4j.appender.turbine.file = ${applicationRoot}/logs/turbine.log
log4j.appender.turbine.layout = org.apache.log4j.PatternLayout
log4j.appender.turbine.layout.conversionPattern = %d [%t] %-5p %c - %m%n
log4j.appender.turbine.append = false

#
# torque.log
# 
log4j.appender.torque = org.apache.log4j.FileAppender
log4j.appender.torque.file = ${applicationRoot}/logs/torque.log
log4j.appender.torque.layout = org.apache.log4j.PatternLayout
log4j.appender.torque.layout.conversionPattern = %d [%t] %-5p %c - %m%n
log4j.appender.torque.append = false

#
# Scheduler Output
#
log4j.appender.scheduler = org.apache.log4j.FileAppender
log4j.appender.scheduler.file = ${applicationRoot}/logs/scheduler.log
log4j.appender.scheduler.layout = org.apache.log4j.PatternLayout
log4j.appender.scheduler.layout.conversionPattern = %d [%t] %-5p %c - %m%n
log4j.appender.scheduler.append = false

#
# Velocity gets configured to write its output onto the velocity
# category.
#
log4j.appender.velocity = org.apache.log4j.FileAppender
log4j.appender.velocity.file = ${applicationRoot}/logs/velocity.log
log4j.appender.velocity.layout = org.apache.log4j.PatternLayout
log4j.appender.velocity.layout.conversionPattern = %d [%t] %-5p %c - %m%n
log4j.appender.velocity.append = false

#
# Avalon gets configured to write its output onto the avalon
# category.
#
log4j.appender.avalon = org.apache.log4j.FileAppender
log4j.appender.avalon.file = ${applicationRoot}/logs/avalon.log
log4j.appender.avalon.layout = org.apache.log4j.PatternLayout
log4j.appender.avalon.layout.conversionPattern = %d [%t] %-5p %c - %m%n
log4j.appender.avalon.append = false
--- cut ---

This is, BTW exactly the same file that is in the turbine HEAD
CVS as conf/Log4j.properties.

In the TR.props file, logging is only one line:


--- cut ---
log4j.file = /WEB-INF/conf/Log4j.properties
--- cut ---

	Regards
		Henning

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

Java, perl, Solaris, Linux, xSP Consulting, Web Services 
freelance consultant -- Jakarta Turbine Development  -- hero for hire

--- Quote of the week: "It is pointless to tell people anything when
you know that they won't process the message." --- Jonathan Revusky

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