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
669a66f1
Commit
669a66f1
authored
Sep 26, 2018
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
format
parent
e8dae261
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
6 deletions
+3
-6
include/spdlog/common.h
include/spdlog/common.h
+2
-3
include/spdlog/sinks/dist_sink.h
include/spdlog/sinks/dist_sink.h
+1
-3
No files found.
include/spdlog/common.h
View file @
669a66f1
...
@@ -14,8 +14,8 @@
...
@@ -14,8 +14,8 @@
#include <memory>
#include <memory>
#include <stdexcept>
#include <stdexcept>
#include <string>
#include <string>
#include <unordered_map>
#include <type_traits>
#include <type_traits>
#include <unordered_map>
#if defined(SPDLOG_WCHAR_FILENAMES) || defined(SPDLOG_WCHAR_TO_UTF8_SUPPORT)
#if defined(SPDLOG_WCHAR_FILENAMES) || defined(SPDLOG_WCHAR_TO_UTF8_SUPPORT)
#include <codecvt>
#include <codecvt>
...
@@ -169,7 +169,6 @@ using filename_t = std::string;
...
@@ -169,7 +169,6 @@ using filename_t = std::string;
err_handler_("Unknown exeption in logger"); \
err_handler_("Unknown exeption in logger"); \
}
}
namespace
details
{
namespace
details
{
// make_unique support for pre c++14
// make_unique support for pre c++14
...
@@ -179,7 +178,7 @@ using std::make_unique;
...
@@ -179,7 +178,7 @@ using std::make_unique;
template
<
typename
T
,
typename
...
Args
>
template
<
typename
T
,
typename
...
Args
>
std
::
unique_ptr
<
T
>
make_unique
(
Args
&&
...
args
)
std
::
unique_ptr
<
T
>
make_unique
(
Args
&&
...
args
)
{
{
static_assert
(
!
std
::
is_array
<
T
>::
value
,
"arrays to not supported"
);
static_assert
(
!
std
::
is_array
<
T
>::
value
,
"arrays to not supported"
);
return
std
::
unique_ptr
<
T
>
(
new
T
(
std
::
forward
<
Args
>
(
args
)...));
return
std
::
unique_ptr
<
T
>
(
new
T
(
std
::
forward
<
Args
>
(
args
)...));
}
}
#endif
#endif
...
...
include/spdlog/sinks/dist_sink.h
View file @
669a66f1
...
@@ -67,19 +67,17 @@ protected:
...
@@ -67,19 +67,17 @@ protected:
}
}
}
}
void
set_pattern_
(
const
std
::
string
&
pattern
)
override
void
set_pattern_
(
const
std
::
string
&
pattern
)
override
{
{
set_formatter_
(
spdlog
::
make_unique
<
spdlog
::
pattern_formatter
>
(
pattern
));
set_formatter_
(
spdlog
::
make_unique
<
spdlog
::
pattern_formatter
>
(
pattern
));
}
}
void
set_formatter_
(
std
::
unique_ptr
<
spdlog
::
formatter
>
sink_formatter
)
override
void
set_formatter_
(
std
::
unique_ptr
<
spdlog
::
formatter
>
sink_formatter
)
override
{
{
base_sink
<
Mutex
>::
formatter_
=
std
::
move
(
sink_formatter
);
base_sink
<
Mutex
>::
formatter_
=
std
::
move
(
sink_formatter
);
for
(
auto
&
sink
:
sinks_
)
for
(
auto
&
sink
:
sinks_
)
{
{
sink
->
set_formatter
(
base_sink
<
Mutex
>::
formatter_
->
clone
());
sink
->
set_formatter
(
base_sink
<
Mutex
>::
formatter_
->
clone
());
}
}
}
}
std
::
vector
<
std
::
shared_ptr
<
sink
>>
sinks_
;
std
::
vector
<
std
::
shared_ptr
<
sink
>>
sinks_
;
...
...
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