Safir SDK Core
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Log.h
Go to the documentation of this file.
1 /******************************************************************************
2 *
3 * Copyright Saab AB, 2013 (http://safir.sourceforge.net)
4 *
5 * Created by: Anders Widén
6 *
7 *******************************************************************************
8 *
9 * This file is part of Safir SDK Core.
10 *
11 * Safir SDK Core is free software: you can redistribute it and/or modify
12 * it under the terms of version 3 of the GNU General Public License as
13 * published by the Free Software Foundation.
14 *
15 * Safir SDK Core is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with Safir SDK Core. If not, see <http://www.gnu.org/licenses/>.
22 *
23 ******************************************************************************/
24 #ifndef __SAFIR_LOGGING_LOG_H__
25 #define __SAFIR_LOGGING_LOG_H__
26 
27 #if defined _MSC_VER
28 # ifdef logging_cpp_EXPORTS
29 # define LOGGING_EXPORTS __declspec(dllexport)
30 # else
31 # define LOGGING_EXPORTS __declspec(dllimport)
32 # ifdef NDEBUG
33 # pragma comment( lib, "logging_cpp.lib" )
34 # else
35 # pragma comment( lib, "logging_cppd.lib" )
36 # endif
37 # endif
38 #elif defined __GNUC__
39 # define LOGGING_EXPORTS
40 #endif
41 
42 #include <string>
43 
44 namespace Safir
45 {
46 namespace Logging
47 {
53  enum Severity
54  {
56  Emergency = 0,
57 
60 
63 
66 
69 
72 
75 
78  };
79 
80 
91  LOGGING_EXPORTS void SendSystemLog(const Severity severity,
92  const std::wstring& message);
93 
94 }
95 }
96 
97 #endif
RFC 3164 Description: Debug-level messages.
Definition: Log.h:77
Severity
Severity level according to RFC 3164.
Definition: Log.h:53
RFC 3164 Description: Warning conditions.
Definition: Log.h:68
RFC 3164 Description: Error conditions.
Definition: Log.h:65
RFC 3164 Description: Normal but significant condition.
Definition: Log.h:71
RFC 3164 Description: System is unusable.
Definition: Log.h:56
RFC 3164 Description: Informational messages.
Definition: Log.h:74
LOGGING_EXPORTS void SendSystemLog(const Severity severity, const std::wstring &message)
Send log messages to the system logging mechanism.
RFC 3164 Description: Action must be taken immediately.
Definition: Log.h:59
RFC 3164 Description: Critical conditions.
Definition: Log.h:62