NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
levels.hpp
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2014, Peter Thorson. All rights reserved.
3
*
4
* Redistribution and use in source and binary forms, with or without
5
* modification, are permitted provided that the following conditions are met:
6
* * Redistributions of source code must retain the above copyright
7
* notice, this list of conditions and the following disclaimer.
8
* * Redistributions in binary form must reproduce the above copyright
9
* notice, this list of conditions and the following disclaimer in the
10
* documentation and/or other materials provided with the distribution.
11
* * Neither the name of the WebSocket++ Project nor the
12
* names of its contributors may be used to endorse or promote products
13
* derived from this software without specific prior written permission.
14
*
15
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18
* ARE DISCLAIMED. IN NO EVENT SHALL PETER THORSON BE LIABLE FOR ANY
19
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25
*
26
*/
27
28
#ifndef WEBSOCKETPP_LOGGER_LEVELS_HPP
29
#define WEBSOCKETPP_LOGGER_LEVELS_HPP
30
31
#include <
websocketpp/common/stdint.hpp
>
32
33
namespace
websocketpp
{
34
namespace
log {
35
37
typedef
uint32_t
level
;
38
40
46
struct
channel_type_hint
{
48
typedef
uint32_t
value
;
49
51
static
value
const
none
= 0;
53
static
value
const
access
= 1;
55
static
value
const
error
= 2;
56
};
57
59
struct
elevel
{
61
static
level
const
none
= 0x0;
63
static
level
const
devel = 0x1;
66
static
level
const
library = 0x2;
69
static
level
const
info
= 0x4;
72
static
level
const
warn = 0x8;
75
static
level
const
rerror = 0x10;
78
static
level
const
fatal = 0x20;
80
static
level
const
all = 0xffffffff;
81
83
91
static
char
const
*
channel_name
(level channel) {
92
switch
(channel) {
93
case
devel:
94
return
"devel"
;
95
case
library:
96
return
"library"
;
97
case
info
:
98
return
"info"
;
99
case
warn:
100
return
"warning"
;
101
case
rerror:
102
return
"error"
;
103
case
fatal:
104
return
"fatal"
;
105
default
:
106
return
"unknown"
;
107
}
108
}
109
};
110
112
struct
alevel
{
114
static
level
const
none
= 0x0;
116
121
static
level
const
connect = 0x1;
123
static
level
const
disconnect = 0x2;
125
static
level
const
control = 0x4;
127
static
level
const
frame_header = 0x8;
129
static
level
const
frame_payload = 0x10;
131
static
level
const
message_header = 0x20;
133
static
level
const
message_payload = 0x40;
135
static
level
const
endpoint
= 0x80;
137
static
level
const
debug_handshake = 0x100;
139
static
level
const
debug_close = 0x200;
141
static
level
const
devel = 0x400;
143
static
level
const
app = 0x800;
145
static
level
const
http = 0x1000;
147
static
level
const
fail = 0x2000;
150
static
level
const
access_core = 0x00003003;
152
static
level
const
all = 0xffffffff;
153
155
164
static
char
const
*
channel_name
(level channel) {
165
switch
(channel) {
166
case
connect:
167
return
"connect"
;
168
case
disconnect:
169
return
"disconnect"
;
170
case
control:
171
return
"control"
;
172
case
frame_header:
173
return
"frame_header"
;
174
case
frame_payload:
175
return
"frame_payload"
;
176
case
message_header:
177
return
"message_header"
;
178
case
message_payload:
179
return
"message_payload"
;
180
case
endpoint:
181
return
"endpoint"
;
182
case
debug_handshake:
183
return
"debug_handshake"
;
184
case
debug_close:
185
return
"debug_close"
;
186
case
devel:
187
return
"devel"
;
188
case
app:
189
return
"application"
;
190
case
http:
191
return
"http"
;
192
case
fail:
193
return
"fail"
;
194
default
:
195
return
"unknown"
;
196
}
197
}
198
};
199
200
}
// logger
201
}
// websocketpp
202
203
#endif //WEBSOCKETPP_LOGGER_LEVELS_HPP
websocketpp::log::channel_type_hint::value
uint32_t value
Type of a channel type hint value.
Definition:
levels.hpp:48
websocketpp::log::channel_type_hint::access
static value const access
Access log.
Definition:
levels.hpp:53
info
SignatureInfo info
Definition:
verification-helpers.cpp:56
websocketpp::log::alevel
Package of log levels for logging access events.
Definition:
levels.hpp:112
stdint.hpp
websocketpp::log::channel_type_hint
Package of values for hinting at the nature of a given logger.
Definition:
levels.hpp:46
websocketpp::log::channel_type_hint::error
static value const error
Error log.
Definition:
levels.hpp:55
websocketpp
Namespace for the WebSocket++ project.
Definition:
base64.hpp:41
websocketpp::endpoint
Creates and manages connections associated with a WebSocket endpoint.
Definition:
endpoint.hpp:42
websocketpp::log::elevel::channel_name
static char const * channel_name(level channel)
Get the textual name of a channel given a channel id.
Definition:
levels.hpp:91
websocketpp::log::channel_type_hint::none
static value const none
No information.
Definition:
levels.hpp:51
websocketpp::log::elevel
Package of log levels for logging errors.
Definition:
levels.hpp:59
websocketpp::log::level
uint32_t level
Type of a channel package.
Definition:
levels.hpp:37
websocketpp::log::alevel::channel_name
static char const * channel_name(level channel)
Get the textual name of a channel given a channel id.
Definition:
levels.hpp:164
ndnSIM
NFD
websocketpp
websocketpp
logger
levels.hpp
Generated on Fri May 6 2022 12:34:15 for ndnSIM by
1.8.13