Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F140066
debug.hpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
debug.hpp
View Options
/*
* This file is part of libkazv.
* SPDX-FileCopyrightText: 2020 Tusooa Zhu
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
#pragma once
#include
"libkazv-config.hpp"
#include
<iostream>
#include
<chrono>
#include
<ctime>
#include
<boost/iostreams/stream.hpp>
namespace
Kazv
{
namespace
detail
{
extern
boost
::
iostreams
::
stream
<
boost
::
iostreams
::
null_sink
>
voidOutputHelper
;
enum
OutputLevel
{
NONE
,
ERROR
,
WARNING
,
INFO
,
DEBUG
,
};
struct
OutputHelper
{
std
::
string
category
;
OutputLevel
severity
;
OutputLevel
level
;
std
::
ostream
&
basicFormat
()
const
;
template
<
class
T
>
std
::
ostream
&
operator
<<
(
T
&&
arg
)
const
{
if
(
severity
<=
level
)
{
return
basicFormat
()
<<
std
::
forward
<
T
>
(
arg
);
}
else
{
return
voidOutputHelper
;
}
}
};
struct
OutputGroup
{
std
::
string
name
;
OutputLevel
level
;
OutputHelper
dbg
()
const
;
OutputHelper
info
()
const
;
OutputHelper
warn
()
const
;
OutputHelper
err
()
const
;
};
struct
OutputConfig
{
OutputConfig
();
OutputGroup
api
;
OutputGroup
base
;
OutputGroup
client
;
OutputGroup
ee
;
OutputGroup
job
;
OutputGroup
crypto
;
};
}
extern
const
detail
::
OutputConfig
kzo
;
}
File Metadata
Details
Attached
Mime Type
text/x-c++
Expires
Sun, Jan 19, 11:38 AM (2 h, 2 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
55137
Default Alt Text
debug.hpp (1 KB)
Attached To
Mode
rL libkazv
Attached
Detach File
Event Timeline
Log In to Comment