Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:39:25

0001 /*
0002  *          Copyright Andrey Semashev 2007 - 2015.
0003  * Distributed under the Boost Software License, Version 1.0.
0004  *    (See accompanying file LICENSE_1_0.txt or copy at
0005  *          http://www.boost.org/LICENSE_1_0.txt)
0006  */
0007 /*!
0008  * \file   syslog_constants.hpp
0009  * \author Andrey Semashev
0010  * \date   08.01.2008
0011  *
0012  * The header contains definition of constants related to Syslog API. The constants can be
0013  * used in other places without the Syslog backend.
0014  */
0015 
0016 #ifndef BOOST_LOG_SINKS_SYSLOG_CONSTANTS_HPP_INCLUDED_HPP_
0017 #define BOOST_LOG_SINKS_SYSLOG_CONSTANTS_HPP_INCLUDED_HPP_
0018 
0019 #include <boost/log/detail/config.hpp>
0020 
0021 #ifdef BOOST_HAS_PRAGMA_ONCE
0022 #pragma once
0023 #endif
0024 
0025 #ifndef BOOST_LOG_WITHOUT_SYSLOG
0026 
0027 #include <boost/log/detail/header.hpp>
0028 
0029 namespace boost {
0030 
0031 BOOST_LOG_OPEN_NAMESPACE
0032 
0033 namespace sinks {
0034 
0035 namespace syslog {
0036 
0037     //! Syslog record levels
0038     enum level
0039     {
0040         emergency = 0,                //!< Equivalent to LOG_EMERG in syslog API
0041         alert = 1,                    //!< Equivalent to LOG_ALERT in syslog API
0042         critical = 2,                 //!< Equivalent to LOG_CRIT in syslog API
0043         error = 3,                    //!< Equivalent to LOG_ERROR in syslog API
0044         warning = 4,                  //!< Equivalent to LOG_WARNING in syslog API
0045         notice = 5,                   //!< Equivalent to LOG_NOTICE in syslog API
0046         info = 6,                     //!< Equivalent to LOG_INFO in syslog API
0047         debug = 7                     //!< Equivalent to LOG_DEBUG in syslog API
0048     };
0049 
0050     /*!
0051      * The function constructs log record level from an integer
0052      */
0053     BOOST_LOG_API level make_level(int lev);
0054 
0055     //! Syslog facility codes
0056     enum facility
0057     {
0058         kernel = 0 * 8,               //!< Kernel messages
0059         user = 1 * 8,                 //!< User-level messages. Equivalent to LOG_USER in syslog API.
0060         mail = 2 * 8,                 //!< Mail system messages. Equivalent to LOG_MAIL in syslog API.
0061         daemon = 3 * 8,               //!< System daemons. Equivalent to LOG_DAEMON in syslog API.
0062         security0 = 4 * 8,            //!< Security/authorization messages
0063         syslogd = 5 * 8,              //!< Messages from the syslogd daemon. Equivalent to LOG_SYSLOG in syslog API.
0064         printer = 6 * 8,              //!< Line printer subsystem. Equivalent to LOG_LPR in syslog API.
0065         news = 7 * 8,                 //!< Network news subsystem. Equivalent to LOG_NEWS in syslog API.
0066         uucp = 8 * 8,                 //!< Messages from UUCP subsystem. Equivalent to LOG_UUCP in syslog API.
0067         clock0 = 9 * 8,               //!< Messages from the clock daemon
0068         security1 = 10 * 8,           //!< Security/authorization messages
0069         ftp = 11 * 8,                 //!< Messages from FTP daemon
0070         ntp = 12 * 8,                 //!< Messages from NTP daemon
0071         log_audit = 13 * 8,           //!< Security/authorization messages
0072         log_alert = 14 * 8,           //!< Security/authorization messages
0073         clock1 = 15 * 8,              //!< Messages from the clock daemon
0074         local0 = 16 * 8,              //!< For local use. Equivalent to LOG_LOCAL0 in syslog API
0075         local1 = 17 * 8,              //!< For local use. Equivalent to LOG_LOCAL1 in syslog API
0076         local2 = 18 * 8,              //!< For local use. Equivalent to LOG_LOCAL2 in syslog API
0077         local3 = 19 * 8,              //!< For local use. Equivalent to LOG_LOCAL3 in syslog API
0078         local4 = 20 * 8,              //!< For local use. Equivalent to LOG_LOCAL4 in syslog API
0079         local5 = 21 * 8,              //!< For local use. Equivalent to LOG_LOCAL5 in syslog API
0080         local6 = 22 * 8,              //!< For local use. Equivalent to LOG_LOCAL6 in syslog API
0081         local7 = 23 * 8               //!< For local use. Equivalent to LOG_LOCAL7 in syslog API
0082     };
0083 
0084     /*!
0085      * The function constructs log source facility from an integer
0086      */
0087     BOOST_LOG_API facility make_facility(int fac);
0088 
0089 } // namespace syslog
0090 
0091 } // namespace sinks
0092 
0093 BOOST_LOG_CLOSE_NAMESPACE // namespace log
0094 
0095 } // namespace boost
0096 
0097 #include <boost/log/detail/footer.hpp>
0098 
0099 #endif // BOOST_LOG_WITHOUT_SYSLOG
0100 
0101 #endif // BOOST_LOG_SINKS_SYSLOG_CONSTANTS_HPP_INCLUDED_HPP_