[AGENT++] LOGGING mechanism for AGENT++,snmp++
Ramasubramanian Venkataraman
venkiram_be at yahoo.co.in
Thu Jul 5 07:01:11 CEST 2007
Hi Jochen,
Yes the file has re-created if i delete it. Also the LOGS are coming in a stdout console.
Am i missing anything here?
Thanks,
Venkataraman
----- Original Message ----
From: Jochen Katz <katz at agentpp.com>
To: agentpp at agentpp.org
Sent: Thursday, 5 July, 2007 12:52:59 AM
Subject: Re: [AGENT++] LOGGING mechanism for AGENT++,snmp++
Hi,
> Is there a way to redirect the AGENT++,SNMP++ log messages to a single file.
>
> I have tried with the following piece of code in my application
>
> DefaultLog::init(new AgentLogImpl(LOG_FILE_NAME));
> DefaultLog::log()->set_filter(ERROR_LOG, 5);
> DefaultLog::log()->set_filter(WARNING_LOG, 5);
> DefaultLog::log()->set_filter(EVENT_LOG, 5);
> DefaultLog::log()->set_filter(INFO_LOG, 5);
> DefaultLog::log()->set_filter(DEBUG_LOG, 8);
this code should do exactly what you want.
> But still the file name alone created in the given path but there is nothing in it.
> Can some one help me how to redirect the AGENT++,snmp++ logs into a single file.
Does the application recreate the file if you delete it? Do you still
get the log output on stdout?
Regards,
Jochen
_______________________________________________
AGENTPP mailing list
AGENTPP at agentpp.org
http://lists.agentpp.org/mailman/listinfo/agentpp
__________________________________________________________
Yahoo! India Answers: Share what you know. Learn something new
http://in.answers.yahoo.com/
More information about the AGENTPP
mailing list