Here's an example, hopefully this will help:

void my_log_handler(os_handler_t         *os_handler,
                    const char           *format,
                    enum ipmi_log_type_e log_level,
                    va_list              args) {

   // Do nothing in order to suppress OpenIPMI log output,
   // or do your own printfs/syslogs etc... .
}

os_handler = ipmi_posix_setup_os_handler();
os_handler->set_log_handler(os_handler, my_log_handler);

--Jen

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Corey Minyard
Sent: Thursday, September 27, 2007 11:23 AM
To: baranidharan
Cc: [email protected]
Subject: Re: [Openipmi-developer] OpenIPMI log messages

baranidharan wrote:
> Hii all,
> In my application , i have the logging facility for the printf() 
> statemet , wherever  i  put
> printf() statemet , that staemet write in to the my own log file, but
i 
> am not able
> write the OpenIPMI log messges (ipmi_log) in to my own log file , it's

> directly printing into
> console.
> How to write the OpenIPMI log messages in to my own log file.
OpenIPMI will not do this for you.  Instead of your printf statement,
you need to look at the severity level, and if it's below your threshold
open a file and append the message, and if it's above your threshold you
need to printf it (and log it, too, most likely).  Or something like
that.  It really depends on what you need.

-corey


------------------------------------------------------------------------
-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Openipmi-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openipmi-developer


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Openipmi-developer mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openipmi-developer

Reply via email to