00001 /* 00002 * log.h 00003 * 00004 * Interfaces for logging info, warnings, errors, etc. to a system log 00005 * 00006 * Author: MontaVista Software, Inc. 00007 * Corey Minyard <minyard@mvista.com> 00008 * source@mvista.com 00009 * 00010 * Copyright 2002,2003,2004,2005 MontaVista Software Inc. 00011 * 00012 * This software is available to you under a choice of one of two 00013 * licenses. You may choose to be licensed under the terms of the GNU 00014 * Lesser General Public License (GPL) Version 2 or the modified BSD 00015 * license below. The following disclamer applies to both licenses: 00016 * 00017 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED 00018 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 00019 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 00020 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 00021 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 00022 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS 00023 * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 00024 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR 00025 * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 00026 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00027 * 00028 * GNU Lesser General Public Licence 00029 * 00030 * This program is free software; you can redistribute it and/or 00031 * modify it under the terms of the GNU Lesser General Public License 00032 * as published by the Free Software Foundation; either version 2 of 00033 * the License, or (at your option) any later version. 00034 * 00035 * You should have received a copy of the GNU Lesser General Public 00036 * License along with this program; if not, write to the Free 00037 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00038 * 00039 * Modified BSD Licence 00040 * 00041 * Redistribution and use in source and binary forms, with or without 00042 * modification, are permitted provided that the following conditions 00043 * are met: 00044 * 00045 * 1. Redistributions of source code must retain the above copyright 00046 * notice, this list of conditions and the following disclaimer. 00047 * 2. Redistributions in binary form must reproduce the above 00048 * copyright notice, this list of conditions and the following 00049 * disclaimer in the documentation and/or other materials provided 00050 * with the distribution. 00051 * 3. The name of the author may not be used to endorse or promote 00052 * products derived from this software without specific prior 00053 * written permission. 00054 */ 00055 00056 00057 #ifndef __IPMI_LOG_H_ 00058 #define __IPMI_LOG_H_ 00059 00060 #ifdef __cplusplus 00061 extern "C" { 00062 #endif 00063 00064 /* Types of logs that may be generated. */ 00065 enum ipmi_log_type_e 00066 { 00067 /* General information about something that happens. */ 00068 IPMI_LOG_INFO, 00069 00070 /* An internal error (not reported directly to the user) occurred, 00071 but it's not a big deal, the system can still operate. */ 00072 IPMI_LOG_WARNING, 00073 00074 /* An internal error (not reported directly to the user) occured, 00075 and it will affect the operation of the system. This system 00076 will still operation, but probably in a degraded mode. */ 00077 IPMI_LOG_SEVERE, 00078 00079 /* An internal error occured, and it is dangerous for the system 00080 to keep operating. */ 00081 IPMI_LOG_FATAL, 00082 00083 /* When returning errors to the user, this will often be used to 00084 report the general cause of the error if the cause would be 00085 difficult to determine from just the error return code. */ 00086 IPMI_LOG_ERR_INFO, 00087 00088 /* Debug information is being generated. */ 00089 IPMI_LOG_DEBUG, 00090 00091 /* Sometimes debug information is generated in multiple parts. 00092 These log types mark the first, intermediate, and end of a 00093 multi-part log. These will all be generated together from the 00094 same thread. */ 00095 IPMI_LOG_DEBUG_START, 00096 IPMI_LOG_DEBUG_CONT, 00097 IPMI_LOG_DEBUG_END, 00098 }; 00099 00100 #ifdef __cplusplus 00101 } 00102 #endif 00103 00104 #endif /* __IPMI_LOG_H_ */