You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by "Henning P. Schmiedehausen" <hp...@intermeta.de> on 2002/12/24 01:18:02 UTC

New Logging - Where is the configuration file and how is it loaded

Hi,

I got some complaints about the path and default value of the
log4j.file property in the TurbineResources.properties.

In Turbine, there are two really important pathes: The WebRoot and the
Application Root. They can be the same value. They might be different
values (especially with development and/or debugging configurations).

The Log4j.properties are loaded relative to the Application Root. So
the configuration file must be in <application root
directory>/WEB-INF/conf/Log4j.properties (if you didn't change the
default).

The application root is the same as the webroot if 

- you have no parameter in web.xml setting the application root
- have the following in your web.xml
    <init-param>
      <param-name>applicationRoot</param-name>
      <param-value>webContext</param-value>
    </init-param>

   The "magic value" 'webContext' forces Turbine to match its internal
   pathes to be the same. 

- If you do set the applicationRoot parameter in your web.xml to
  a different value, then the Log4j.properties file moves with it.
  The reason for this is, that the getRealPath() method in Turbine
  returns its pathes relative to the application root. This is correct
  for "split" development configurations (Development outside the 
  webapp directory) and also for Deployment configurations (where
  both pathes are the same).

So, if you have trouble loading the log4j.file, please check your
web.xml whether you have your applicationRoot set different than
expected.

For the brave: I did check in some (commented-out) debugging
information lines in Turbine.java. Check out the HEAD, uncomment these
lines and run the newly created jar. The Debugging will end up on
stdout and (on Catalina) in logs/catalina.out, because logging isn't
set up yet (because we debug the logging. :-))

If you have trouble and consider still a but in the loading of the
Debug code, send me that output and all error messages.

I posted a HOWTO to turbine.dev and turbine.users for using the CVS
HEAD with the 2.2_01 TDK.

And now, everyone have a wonderful christmas time, keep away from
computers (I will at least until 26th) and if you can't, check out
that new code. :-)

	Regards
		Henning




-- 
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen       -- Geschaeftsfuehrer
INTERMETA - Gesellschaft fuer Mehrwertdienste mbH     hps@intermeta.de

Am Schwabachgrund 22  Fon.: 09131 / 50654-0   info@intermeta.de
D-91054 Buckenhof     Fax.: 09131 / 50654-20   

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: New Logging - Where is the configuration file and how is it loaded

Posted by "Henning P. Schmiedehausen" <hp...@intermeta.de>.
I wrote:

>If you have trouble and consider still a but in the loading of the
>Debug code, send me that output and all error messages.

I meant: 

If you have trouble and consider this still a bu_g_ in the loading of
the _Log configuration properties_, send me that output and all error messages.

Holidays. Now.

	Regards
		Henning


-- 
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen       -- Geschaeftsfuehrer
INTERMETA - Gesellschaft fuer Mehrwertdienste mbH     hps@intermeta.de

Am Schwabachgrund 22  Fon.: 09131 / 50654-0   info@intermeta.de
D-91054 Buckenhof     Fax.: 09131 / 50654-20   

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>