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
0db417f9
Commit
0db417f9
authored
Dec 02, 2014
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merged drop() from master
parent
7a9781a9
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
0 deletions
+13
-0
include/spdlog/details/registry.h
include/spdlog/details/registry.h
+5
-0
include/spdlog/details/spdlog_impl.h
include/spdlog/details/spdlog_impl.h
+4
-0
include/spdlog/spdlog.h
include/spdlog/spdlog.h
+4
-0
No files found.
include/spdlog/details/registry.h
View file @
0db417f9
...
@@ -72,6 +72,11 @@ public:
...
@@ -72,6 +72,11 @@ public:
return
new_logger
;
return
new_logger
;
}
}
void
drop
(
const
std
::
string
&
logger_name
)
{
std
::
lock_guard
<
std
::
mutex
>
lock
(
_mutex
);
_loggers
.
erase
(
logger_name
);
}
std
::
shared_ptr
<
logger
>
create
(
const
std
::
string
&
logger_name
,
sinks_init_list
sinks
)
std
::
shared_ptr
<
logger
>
create
(
const
std
::
string
&
logger_name
,
sinks_init_list
sinks
)
{
{
...
...
include/spdlog/details/spdlog_impl.h
View file @
0db417f9
...
@@ -37,6 +37,10 @@ inline std::shared_ptr<spdlog::logger> spdlog::get(const std::string& name)
...
@@ -37,6 +37,10 @@ inline std::shared_ptr<spdlog::logger> spdlog::get(const std::string& name)
return
details
::
registry
::
instance
().
get
(
name
);
return
details
::
registry
::
instance
().
get
(
name
);
}
}
inline
void
spdlog
::
drop
(
const
std
::
string
&
name
)
{
details
::
registry
::
instance
().
drop
(
name
);
}
// Create multi/single threaded rotating file logger
// Create multi/single threaded rotating file logger
inline
std
::
shared_ptr
<
spdlog
::
logger
>
spdlog
::
rotating_logger_mt
(
const
std
::
string
&
logger_name
,
const
std
::
string
&
filename
,
size_t
max_file_size
,
size_t
max_files
,
bool
auto_flush
)
inline
std
::
shared_ptr
<
spdlog
::
logger
>
spdlog
::
rotating_logger_mt
(
const
std
::
string
&
logger_name
,
const
std
::
string
&
filename
,
size_t
max_file_size
,
size_t
max_files
,
bool
auto_flush
)
...
...
include/spdlog/spdlog.h
View file @
0db417f9
...
@@ -42,6 +42,10 @@ namespace spdlog
...
@@ -42,6 +42,10 @@ namespace spdlog
// logger.info() << "This is another message" << x << y << z;
// logger.info() << "This is another message" << x << y << z;
std
::
shared_ptr
<
logger
>
get
(
const
std
::
string
&
name
);
std
::
shared_ptr
<
logger
>
get
(
const
std
::
string
&
name
);
//
// Drop the reference to this logger.
//
void
drop
(
const
std
::
string
&
name
);
//
//
// Set global formatting
// Set global formatting
...
...
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