Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
spdlog
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
spdlog
Commits
6225a9fa
Commit
6225a9fa
authored
Jul 19, 2018
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor cleaning of spdlog.h
parent
3aaefc48
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
10 deletions
+1
-10
include/spdlog/spdlog.h
include/spdlog/spdlog.h
+1
-10
No files found.
include/spdlog/spdlog.h
View file @
6225a9fa
...
@@ -44,43 +44,34 @@ inline std::shared_ptr<spdlog::logger> create(std::string logger_name, SinkArgs
...
@@ -44,43 +44,34 @@ inline std::shared_ptr<spdlog::logger> create(std::string logger_name, SinkArgs
return
default_factory
::
create
<
Sink
>
(
std
::
move
(
logger_name
),
std
::
forward
<
SinkArgs
>
(
sink_args
)...);
return
default_factory
::
create
<
Sink
>
(
std
::
move
(
logger_name
),
std
::
forward
<
SinkArgs
>
(
sink_args
)...);
}
}
//
// Return an existing logger or nullptr if a logger with such name doesn't exist.
// Return an existing logger or nullptr if a logger with such name doesn't exist.
// example: spdlog::get("my_logger")->info("hello {}", "world");
// example: spdlog::get("my_logger")->info("hello {}", "world");
//
inline
std
::
shared_ptr
<
logger
>
get
(
const
std
::
string
&
name
)
inline
std
::
shared_ptr
<
logger
>
get
(
const
std
::
string
&
name
)
{
{
return
details
::
registry
::
instance
().
get
(
name
);
return
details
::
registry
::
instance
().
get
(
name
);
}
}
//
// Set global formatting
// Set global formatting
// example: spdlog::set_pattern("%Y-%m-%d %H:%M:%S.%e %l : %v");
// example: spdlog::set_pattern("%Y-%m-%d %H:%M:%S.%e %l : %v");
//
inline
void
set_pattern
(
std
::
string
format_string
,
pattern_time_type
time_type
=
pattern_time_type
::
local
)
inline
void
set_pattern
(
std
::
string
format_string
,
pattern_time_type
time_type
=
pattern_time_type
::
local
)
{
{
details
::
registry
::
instance
().
set_pattern
(
std
::
move
(
format_string
),
time_type
);
details
::
registry
::
instance
().
set_pattern
(
std
::
move
(
format_string
),
time_type
);
}
}
//
// Set global logging level
// Set global logging level
//
inline
void
set_level
(
level
::
level_enum
log_level
)
inline
void
set_level
(
level
::
level_enum
log_level
)
{
{
details
::
registry
::
instance
().
set_level
(
log_level
);
details
::
registry
::
instance
().
set_level
(
log_level
);
}
}
//
// Set global flush level
// Set global flush level
//
inline
void
flush_on
(
level
::
level_enum
log_level
)
inline
void
flush_on
(
level
::
level_enum
log_level
)
{
{
details
::
registry
::
instance
().
flush_on
(
log_level
);
details
::
registry
::
instance
().
flush_on
(
log_level
);
}
}
//
// Set global error handler
// Set global error handler
//
inline
void
set_error_handler
(
log_err_handler
handler
)
inline
void
set_error_handler
(
log_err_handler
handler
)
{
{
details
::
registry
::
instance
().
set_error_handler
(
std
::
move
(
handler
));
details
::
registry
::
instance
().
set_error_handler
(
std
::
move
(
handler
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment