You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@excalibur.apache.org by Marcus Crafter <cr...@managesoft.com> on 2005/01/05 13:19:56 UTC

Logging and FileTarget to user.home, etc

Hi All,

Happy New Year, hope all is going well!

Over in Forrest land, I've come up against an interesting problem
packaging Forrest for Debian.

The problem is pretty simple, there's a single installation of Forrest
for all users in /usr/share/forrest, but the logging configuration
attempts to create log files in a directory under that, owned by
root.root with no write privs to other users.

So, log creation fails.

Easy fix is to point the logs to a directory like /var/log/forrest or
similar but I thought of perhaps being able to put the logs to a local
user directory, perhaps under the forrest site build dir.

The thing is the logkit.xconf is configured with ${key} substituation
which only supports reading from an o.a.a.f.c.Context objet (see
FileTargetFactory.getFilename()).

What I'd like to be able to do is have it also recognize some system
properties as well so we can specify some additional keys to be used
when determining where to write the log files:

user.home
user.name
user.dir

at a minimum, and perhaps any system property that starts with "logkit."
or something like that, allowing us to pass in additional -D parameters
on the command line?

This would let us specify ${user.dir}/build/logs as a target directory,
or similar.

What do you guys think?

Cheers,

Marcus

-- 
         .....
      ,,$$$$$$$$$,      Marcus Crafter
     ;$'      '$$$$:    Computer Systems Engineer
     $:         $$$$:   ManageSoft Corporation
      $       o_)$$$:   Frankfurt am Main, Germany
      ;$,    _/\ &&:'
        '     /( &&&
            \_&&&&'
           &&&&.
     &&&&&&&:

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


Re: Logging and FileTarget to user.home, etc

Posted by Marcus Crafter <cr...@managesoft.com>.
Hi Peter,

peter royal wrote:
> On Jan 5, 2005, at 7:19 AM, Marcus Crafter wrote:
> 
>>The thing is the logkit.xconf is configured with ${key} substituation
>>which only supports reading from an o.a.a.f.c.Context objet (see
>>FileTargetFactory.getFilename()).
>>
>>What I'd like to be able to do is have it also recognize some system
>>properties as well so we can specify some additional keys to be used
>>when determining where to write the log files:
> 
> 
> Would it not be possible to stuff all that into the Context and have it 
> work now?
> -pete

Sure. I thought about that as well. Since the Context is managed in 
Cocoon, we'll can see what the Cocoon folks say.

Cheers,

Marcus

-- 
         .....
      ,,$$$$$$$$$,      Marcus Crafter
     ;$'      '$$$$:    Computer Systems Engineer
     $:         $$$$:   ManageSoft Corporation
      $       o_)$$$:   Frankfurt am Main, Germany
      ;$,    _/\ &&:'
        '     /( &&&
            \_&&&&'
           &&&&.
     &&&&&&&:

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


Re: Logging and FileTarget to user.home, etc

Posted by peter royal <pr...@apache.org>.
On Jan 5, 2005, at 7:19 AM, Marcus Crafter wrote:
> The thing is the logkit.xconf is configured with ${key} substituation
> which only supports reading from an o.a.a.f.c.Context objet (see
> FileTargetFactory.getFilename()).
>
> What I'd like to be able to do is have it also recognize some system
> properties as well so we can specify some additional keys to be used
> when determining where to write the log files:

Would it not be possible to stuff all that into the Context and have it 
work now?
-pete


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