cisst-saw
Loading...
Searching...
No Matches
cmnLogLoD.h
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/* ex: set filetype=cpp softtabstop=4 shiftwidth=4 tabstop=4 cindent expandtab: */
3
4/*
5
6 Author(s): Anton Deguet
7 Created on: 2009-04-13
8
9 (C) Copyright 2009-2010 Johns Hopkins University (JHU), All Rights
10 Reserved.
11
12--- begin cisst license - do not edit ---
13
14This software is provided "as is" under an open source license, with
15no warranty. The complete license can be found in license.txt and
16http://www.cisst.org/cisst/license.txt.
17
18--- end cisst license ---
19
20*/
21
22
28#pragma once
29
30#ifndef _cmnLogLoD_h
31#define _cmnLogLoD_h
32
34
35// always include last
37
55typedef short cmnLogLevel;
56
57#define CMN_LOG_LEVEL_NONE 0x00 // 00000000
58#define CMN_LOG_LEVEL_INIT_ERROR 0x01 // 00000001
59#define CMN_LOG_LEVEL_INIT_WARNING 0x02 // 00000010
60#define CMN_LOG_LEVEL_INIT_VERBOSE 0x04 // 00000100
61#define CMN_LOG_LEVEL_INIT_DEBUG 0x08 // 00001000
62#define CMN_LOG_LEVEL_RUN_ERROR 0x10 // 00010000
63#define CMN_LOG_LEVEL_RUN_WARNING 0x20 // 00100000
64#define CMN_LOG_LEVEL_RUN_VERBOSE 0x40 // 01000000
65#define CMN_LOG_LEVEL_RUN_DEBUG 0x80 // 10000000
66
67typedef short cmnLogMask;
68
69#define CMN_LOG_ALLOW_NONE 0x00 // 00000000
70#define CMN_LOG_ALLOW_ERRORS 0x11 // 00010001
71#define CMN_LOG_ALLOW_WARNINGS 0x22 // 00100010
72#define CMN_LOG_ALLOW_ERRORS_AND_WARNINGS 0x33 // 00110011
73#define CMN_LOG_ALLOW_VERBOSE 0x77 // 01110111
74#define CMN_LOG_ALLOW_DEBUG 0xFF // 11111111
75#define CMN_LOG_ALLOW_ALL 0xFF // 11111111
76#define CMN_LOG_ALLOW_DEFAULT CMN_LOG_ALLOW_ERRORS_AND_WARNINGS
77
78#ifndef SWIG
88#define CMN_LOG_LOD_NONE 0x00 // 00000000
89#define CMN_LOG_LOD_INIT_ERROR 0x01 // 00000001
90#define CMN_LOG_LOD_INIT_WARNING 0x03 // 00000011
91#define CMN_LOG_LOD_INIT_VERBOSE 0x07 // 00000111
92#define CMN_LOG_LOD_INIT_DEBUG 0x0F // 00001111
93#define CMN_LOG_LOD_RUN_ERROR 0x1F // 00011111
94#define CMN_LOG_LOD_RUN_WARNING 0x3F // 00111111
95#define CMN_LOG_LOD_RUN_VERBOSE 0x7F // 01111111
96#define CMN_LOG_LOD_RUN_DEBUG 0xFF // 11111111
97#define CMN_LOG_LOD_VERY_VERBOSE CMN_LOG_LOD_RUN_DEBUG
98#define CMN_LOG_DEFAULT_LOD CMN_LOG_ALLOW_ERRORS_AND_WARNINGS
100#endif
101
106
110
114CISST_EXPORT const std::string & cmnLogIndexToString(const size_t & index);
115
119CISST_EXPORT const std::string & cmnLogLevelToString(const cmnLogLevel & level);
120
124
125#endif // _cmnLogLoD_h
Macros to export the symbols of cisstCommon (in a Dll).
#define CISST_EXPORT
Definition cmnExportMacros.h:50
short cmnLogMask
Definition cmnLogLoD.h:67
CISST_EXPORT const std::string & cmnLogIndexToString(const size_t &index)
short cmnLogLevel
Definition cmnLogLoD.h:55
CISST_EXPORT cmnLogLevel cmnIndexToLogLevel(const size_t &index)
CISST_EXPORT const std::string & cmnLogLevelToString(const cmnLogLevel &level)
CISST_EXPORT size_t cmnLogLevelToIndex(const cmnLogLevel &level)
CISST_EXPORT std::string cmnLogMaskToString(const cmnLogMask &mask)
Portability across compilers and operating systems tools.