Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
S
spdlog
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
spdlog
Commits
4ccca079
Commit
4ccca079
authored
Mar 23, 2019
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clone support in lite logger
parent
9e5d1b3b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
0 deletions
+15
-0
example.cpp
lite-example/example.cpp
+5
-0
spdlite.cpp
lite/spdlite.cpp
+5
-0
spdlite.h
lite/spdlite.h
+5
-0
No files found.
lite-example/example.cpp
View file @
4ccca079
...
...
@@ -9,4 +9,8 @@ int main()
l
.
info_printf
(
"Hello %d"
,
12346
);
l
.
warn_printf
(
"Hello %f"
,
12346.5656
);
l
.
warn
(
"Hello {}"
,
"LITE :) "
);
auto
l2
=
l
.
clone
(
"logger2"
);
l2
.
debug
(
"HELLO"
);
}
\ No newline at end of file
lite/spdlite.cpp
View file @
4ccca079
...
...
@@ -125,6 +125,11 @@ void spdlog::lite::logger::set_pattern(std::string pattern)
impl_
->
set_pattern
(
std
::
move
(
pattern
));
}
spdlog
::
lite
::
logger
spdlog
::
lite
::
logger
::
clone
(
std
::
string
logger_name
)
{
return
spdlog
::
lite
::
logger
(
impl_
->
clone
(
std
::
move
(
logger_name
)));
}
void
spdlog
::
lite
::
logger
::
log_formatted_
(
spdlog
::
lite
::
level
lvl
,
const
fmt
::
memory_buffer
&
formatted
)
{
auto
spd_level
=
to_spdlog_level
(
lvl
);
...
...
lite/spdlite.h
View file @
4ccca079
...
...
@@ -174,6 +174,11 @@ public:
//
void
set_pattern
(
std
::
string
pattern
);
//
//clone with new name
//
spdlog
::
lite
::
logger
clone
(
std
::
string
logger_name
);
protected
:
std
::
shared_ptr
<
spdlog
::
logger
>
impl_
;
void
log_formatted_
(
lite
::
level
lvl
,
const
fmt
::
memory_buffer
&
formatted
);
...
...
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