WebCFace
2.9.0
Web-based Communication Framework & Dashboard-like UI
Loading...
Searching...
No Matches
logger.h
Go to the documentation of this file.
1
#pragma once
2
#include <streambuf>
3
#include <memory>
4
#include <string>
5
#include "
webcface/log.h
"
6
7
WEBCFACE_NS_BEGIN
8
9
template
<
typename
CharT>
10
class
BasicLoggerBuf
final :
public
std::basic_streambuf<CharT> {
11
using
traits_type =
typename
std::basic_streambuf<CharT>::traits_type;
12
using
char_type =
typename
std::basic_streambuf<CharT>::char_type;
13
using
int_type =
typename
std::basic_streambuf<CharT>::int_type;
14
15
static
constexpr
int
buf_size = 1024;
16
CharT buf[buf_size];
17
// bufからあふれた分を入れる
18
std::basic_string<CharT> overflow_buf;
19
20
// どうせclientが消える時にはLoggerBufも消える
21
internal::ClientData
*data_p;
22
SharedString
field;
23
24
int
sync()
override
;
25
int_type overflow(int_type
c
)
override
;
26
27
public
:
28
explicit
BasicLoggerBuf
(
internal::ClientData
*data_p,
const
SharedString
&field);
29
~BasicLoggerBuf
() =
default
;
30
};
31
#if WEBCFACE_SYSTEM_DLLEXPORT
32
extern
template
class
BasicLoggerBuf<char>
;
33
extern
template
class
BasicLoggerBuf<wchar_t>
;
34
#endif
35
using
LoggerBuf
=
BasicLoggerBuf<char>
;
36
using
LoggerBufW
=
BasicLoggerBuf<wchar_t>
;
37
38
WEBCFACE_NS_END
webcface::BasicLoggerBuf
Definition
logger.h:10
webcface::BasicLoggerBuf::~BasicLoggerBuf
~BasicLoggerBuf()=default
webcface::SharedString
u8stringとstringとwstringをshared_ptrで持ち共有する
Definition
encoding.h:67
log.h
c
static unsigned char c
Definition
latency-text.cc:13
webcface::internal::ClientData
Definition
client_internal.h:46
WEBCFACE_NS_END
#define WEBCFACE_NS_END
Definition
webcface-config.h:118
WEBCFACE_NS_BEGIN
#define WEBCFACE_NS_BEGIN
Definition
webcface-config.h:117
client
include
webcface
internal
logger.h
Generated on Mon Jun 30 2025 16:48:46 for WebCFace by
1.9.7