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:[EMAIL PROTECTED]
Sent: 28 June 2003 11:37
To: Turbine Users List; [EMAIL PROTECTED]
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:[EMAIL PROTECTED]
Sent: 27 June 2003 21:51
To: [EMAIL PROTECTED]
Subject: Re: T2.3 dev logging setup


"David Wynter" <[EMAIL PROTECTED]> 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:[EMAIL PROTECTED]
>Sent: 26 June 2003 09:06
>To: [EMAIL PROTECTED]
>Subject: Re: T2.3 dev logging setup


>"David Wynter" <[EMAIL PROTECTED]> writes:

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

>       Regards
>               Henning





>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]

--
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen          INTERMETA GmbH
[EMAIL PROTECTED]        +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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to