Annotation of embedaddon/strongswan/src/libcharon/bus/listeners/sys_logger.h, revision 1.1.1.1

1.1       misho       1: /*
                      2:  * Copyright (C) 2012 Tobias Brunner
                      3:  * Copyright (C) 2006 Martin Willi
                      4:  * HSR Hochschule fuer Technik Rapperswil
                      5:  *
                      6:  * This program is free software; you can redistribute it and/or modify it
                      7:  * under the terms of the GNU General Public License as published by the
                      8:  * Free Software Foundation; either version 2 of the License, or (at your
                      9:  * option) any later version.  See <http://www.fsf.org/copyleft/gpl.txt>.
                     10:  *
                     11:  * This program is distributed in the hope that it will be useful, but
                     12:  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
                     13:  * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
                     14:  * for more details.
                     15:  */
                     16: 
                     17: /**
                     18:  * @defgroup sys_logger sys_logger
                     19:  * @{ @ingroup listeners
                     20:  */
                     21: 
                     22: #ifndef SYS_LOGGER_H_
                     23: #define SYS_LOGGER_H_
                     24: 
                     25: #include <bus/listeners/logger.h>
                     26: 
                     27: typedef struct sys_logger_t sys_logger_t;
                     28: 
                     29: /**
                     30:  * Logger for syslog which implements listener_t.
                     31:  */
                     32: struct sys_logger_t {
                     33: 
                     34:        /**
                     35:         * Implements the logger_t interface.
                     36:         */
                     37:        logger_t logger;
                     38: 
                     39:        /**
                     40:         * Set the loglevel for a debug group.
                     41:         *
                     42:         * @param group         debug group to set
                     43:         * @param level         max level to log (0..4)
                     44:         */
                     45:        void (*set_level) (sys_logger_t *this, debug_t group, level_t level);
                     46: 
                     47:        /**
                     48:         * Set options used by this logger.
                     49:         *
                     50:         * @param ike_name      TRUE to prefix the name of the IKE_SA
                     51:         */
                     52:        void (*set_options) (sys_logger_t *this, bool ike_name);
                     53: 
                     54:        /**
                     55:         * Destroys a sys_logger_t object.
                     56:         */
                     57:        void (*destroy) (sys_logger_t *this);
                     58: };
                     59: 
                     60: /**
                     61:  * Constructor to create a sys_logger_t object.
                     62:  *
                     63:  * @param facility     syslog facility to use
                     64:  * @return                     sys_logger_t object
                     65:  */
                     66: sys_logger_t *sys_logger_create(int facility);
                     67: 
                     68: #endif /** SYS_LOGGER_H_ @}*/

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>