plptools
Loading...
Searching...
No Matches
ncp_log.h
Go to the documentation of this file.
1
/*
2
* This file is part of plptools.
3
*
4
* Copyright (C) 1999 Philip Proudman <philip.proudman@btinternet.com>
5
* Copyright (C) 1999-2002 Fritz Elfert <felfert@to.com>
6
* Copyright (C) 2026 Jason Morley <hello@jbmorley.co.uk>
7
*
8
* This program is free software; you can redistribute it and/or modify
9
* it under the terms of the GNU General Public License as published by
10
* the Free Software Foundation; either version 2 of the License, or
11
* (at your option) any later version.
12
*
13
* This program is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
* GNU General Public License for more details.
17
*
18
* You should have received a copy of the GNU General Public License along
19
* along with this program; if not, see <https://www.gnu.org/licenses/>.
20
*
21
*/
22
#ifndef _ncp_log_h_
23
#define _ncp_log_h_
24
25
#include "config.h"
26
27
#include <
log.h
>
28
29
#define NCP_DEBUG_LOG 1
30
#define NCP_DEBUG_DUMP 2
31
#define LNK_DEBUG_LOG 4
32
#define LNK_DEBUG_DUMP 8
33
#define PKT_DEBUG_LOG 16
34
#define PKT_DEBUG_DUMP 32
35
#define PKT_DEBUG_HANDSHAKE 64
36
#define NCP_SESSION_LOG 128
37
38
// Note that these logs are not thread-safe and there's nothing to ensure that log messages from different threads
39
// aren't interlaced. Since these are ultimately written to using `write` logging shouldn't crash, but it's important to
40
// understand the limitations.
41
42
extern
logbuf
ilog
;
43
extern
logbuf
dlog
;
44
extern
logbuf
elog
;
45
46
extern
std::ostream
lout
;
47
extern
std::ostream
lerr
;
48
extern
std::ostream
linf
;
49
50
#endif
logbuf
A streambuffer, logging via syslog.
Definition:
log.h:51
std::basic_ostream
Definition:
doctest.h:530
log.h
lerr
std::ostream lerr
dlog
logbuf dlog
lout
std::ostream lout
elog
logbuf elog
linf
std::ostream linf
ilog
logbuf ilog
ncpd
ncp_log.h
Generated by
1.9.5