Hi Kevin,
thanks for your answer. Sorry, But I don't know the names of all the tasks
in advance. so switching at runtime is not possible. I might add a function
to the appender, to be called with the appender obj and a new filename als
paramater. this function would then close the filehandle of the old logfile,
create a new filehandle with the defined properties, change the name of the
logfile in the datastructure ...
could I come to a working solution for my problem this way?
thanks and greetings
Reinhold
Kevin Goess schrieb:
> Reinhold Redel wrote:
>
>> Now my program has become a daemon. to support logging in the usual
>> way I have the need to change the filename for logging with every task.
>> I looked eg. for a function to delete an appender once added to a logger,
>> or to change the filename for output at least, But didn't find anything
>> in the doc.
>
>
> Not to sound negative, but I would be suprised if you got it to work
> that way. As an alternative, do you know the names of all the tasks in
> advance? Then you could instantiate a logger for each one and switch
> between them at runtime.
--
COMPUTERBILD 15/03: Premium-e-mail-Dienste im Test
--------------------------------------------------
1. GMX TopMail - Platz 1 und Testsieger!
2. GMX ProMail - Platz 2 und Preis-Qualitätssieger!
3. Arcor - 4. web.de - 5. T-Online - 6. freenet.de - 7. daybyday - 8. e-Post
|