sptk2 logo
SPTK Home Page
LogPriority.h
1/*
2╔══════════════════════════════════════════════════════════════════════════════╗
3║ SIMPLY POWERFUL TOOLKIT (SPTK) ║
4╟──────────────────────────────────────────────────────────────────────────────╢
5║ copyright © 1999-2022 Alexey Parshin. All rights reserved. ║
6║ email alexeyp@gmail.com ║
7╚══════════════════════════════════════════════════════════════════════════════╝
8┌──────────────────────────────────────────────────────────────────────────────┐
9│ This library is free software; you can redistribute it and/or modify it │
10│ under the terms of the GNU Library General Public License as published by │
11│ the Free Software Foundation; either version 2 of the License, or (at your │
12│ option) any later version. │
13│ │
14│ This library is distributed in the hope that it will be useful, but │
15│ WITHOUT ANY WARRANTY; without even the implied warranty of │
16│ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library │
17│ General Public License for more details. │
18│ │
19│ You should have received a copy of the GNU Library General Public License │
20│ along with this library; if not, write to the Free Software Foundation, │
21│ Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. │
22│ │
23│ Please report all bugs and problems to alexeyp@gmail.com. │
24└──────────────────────────────────────────────────────────────────────────────┘
25*/
26
27#pragma once
28
29#ifndef _WIN32
30
31#include <syslog.h>
32
33#else
34/* priority codes */
35#define LOG_EMERG 0 /* system is unusable */
36#define LOG_ALERT 1 /* action must be taken immediately */
37#define LOG_CRIT 2 /* critical conditions */
38#define LOG_ERR 3 /* error conditions */
39#define LOG_WARNING 4 /* warning conditions */
40#define LOG_NOTICE 5 /* normal but significant condition */
41#define LOG_INFO 6 /* informational */
42#define LOG_DEBUG 7 /* debug-level messages */
43
44/* facility codes */
45#define LOG_KERN (0 << 3) /* kernel messages */
46#define LOG_USER (1 << 3) /* random user-level messages */
47#define LOG_MAIL (2 << 3) /* mail system */
48#define LOG_DAEMON (3 << 3) /* system daemons */
49#define LOG_AUTH (4 << 3) /* security/authorization messages */
50#define LOG_SYSLOG (5 << 3) /* messages generated internally by syslogd */
51#define LOG_LPR (6 << 3) /* line printer subsystem */
52#define LOG_NEWS (7 << 3) /* network news subsystem */
53#define LOG_UUCP (8 << 3) /* UUCP subsystem */
54#define LOG_CRON (9 << 3) /* clock daemon */
55#endif
56
57namespace sptk {
58
67enum class LogPriority
68{
72 DEBUG = LOG_DEBUG,
73
77 INFO = LOG_INFO,
78
82 NOTICE = LOG_NOTICE,
83
87 WARNING = LOG_WARNING,
88
92 ERR = LOG_ERR,
93
97 CRITICAL = LOG_CRIT,
98
102 ALERT = LOG_ALERT,
103
107 PANIC = LOG_EMERG
108};
109
113} // namespace sptk
LogPriority
Log message priority.
Definition: LogPriority.h:68

Fri Oct 14 2022 09:58:31: SPTK 5.4.1