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
#pragma once
23
24
#include "config.h"
25
26
#include <
log.h
>
27
28
#define NCP_DEBUG_LOG 1
29
#define NCP_DEBUG_DUMP 2
30
#define LNK_DEBUG_LOG 4
31
#define LNK_DEBUG_DUMP 8
32
#define PKT_DEBUG_LOG 16
33
#define PKT_DEBUG_DUMP 32
34
#define PKT_DEBUG_HANDSHAKE 64
35
#define NCP_SESSION_LOG 128
36
37
// Note that these logs are not thread-safe and there's nothing to ensure that log messages from different threads
38
// aren't interlaced. Since these are ultimately written to using `write` logging shouldn't crash, but it's important to
39
// understand the limitations.
40
41
extern
logbuf
ilog
;
42
extern
logbuf
dlog
;
43
extern
logbuf
elog
;
44
45
extern
std::ostream
lout
;
46
extern
std::ostream
lerr
;
47
extern
std::ostream
linf
;
logbuf
A streambuffer, logging via syslog.
Definition:
log.h:50
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
lib
ncp_log.h
Generated by
1.9.5