Personally, I use a separate Log4j config file for build-time -vs- run-time. 
But if you must use the same file, you can always set the property when you run
the tests.  For instance, using Ant...

<junit ...>
  <sysproperty
    key="catalina.home"
    value="${path_to_log_dir}"/>
  ...
  ...
  ...
</junit>


Jake

Quoting Argyro Kazaki <[EMAIL PROTECTED]>:

> Hello,
>
> within log4j.properties file, I have the following:
>
> log4j.logger.system             =ALL, sys
> ...
> log4j.appender.sys.file=${catalina.home}/logs/foo.log
>
> When the container is up, it works fine. When I run unit tests though,
> ${catalina.home} is null and all the logging infos are gone. Is there
> something I can do about it so that I don't have to hardcode the path
> (e.g. log4j.appender.sys.file=C:/Apache/logs/foo.log ) or to change the
> property file every time I want to run the tests??
>
> Thanks,
> Argyro Kazaki
>
>
>
>
> ---------------------------------------------------------------------
> 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