FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
log/src/GlobalLog.cpp at main · vixcpp/log · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
vixcpp
/
log
Public
Notifications
You must be signed in to change notification settings
Fork
0
Star
1
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
log
/
src
/
GlobalLog.cpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
91 lines (74 loc) · 1.5 KB
Breadcrumbs
log
/
src
/
GlobalLog.cpp
Copy path
File metadata and controls
91 lines (74 loc) · 1.5 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
/*
*
*
* @file GlobalLog.cpp
* @author Gaspard Kirira
*
* Copyright 2025, Gaspard Kirira.
* All rights reserved.
* https://github.com/vixcpp/vix
*
* Use of this source code is governed by a MIT license
* that can be found in the License file.
*
* Vix.cpp
*/
#
include
<
vix/log/GlobalLog.hpp
>
namespace
vix
::log
{
LogAdapter &
global
()
noexcept
{
return
LogAdapter::instance
();
}
void
configure
(
const
LogConfig &config)
{
global
().
configure
(config);
}
void
set_level
(LogLevel level_value)
{
global
().
set_level
(level_value);
}
LogLevel
level
()
noexcept
{
return
global
().
level
();
}
bool
enabled
(LogLevel level_value)
noexcept
{
return
global
().
enabled
(level_value);
}
void
set_format
(LogFormat format)
{
global
().
set_format
(format);
}
void
set_async
(
bool
enable)
{
global
().
set_async
(enable);
}
void
set_context
(LogContext ctx)
{
global
().
set_context
(
std::move
(ctx));
}
void
clear_context
()
{
global
().
clear_context
();
}
LogContext
context
()
{
return
global
().
context
();
}
void
set_level_from_env
(std::string_view env_name)
{
global
().
set_level_from_env
(env_name);
}
void
set_format_from_env
(std::string_view env_name)
{
global
().
set_format_from_env
(env_name);
}
LogLevel
parse_level
(std::string_view value)
{
return
LogAdapter::parse_level
(value);
}
LogFormat
parse_format
(std::string_view value)
{
return
LogAdapter::parse_format
(value);
}
}
//
namespace vix::log
Back
|
FazBrowse Home
|
New Git URL