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
78c833a0
Commit
78c833a0
authored
Jun 18, 2019
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
clang-format
parent
38888ba5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
7 additions
and
19 deletions
+7
-19
common.h
include/spdlog/common.h
+0
-2
console_globals.h
include/spdlog/details/console_globals.h
+0
-1
logger-inl.h
include/spdlog/logger-inl.h
+0
-0
logger.h
include/spdlog/logger.h
+1
-2
ansicolor_sink.h
include/spdlog/sinks/ansicolor_sink.h
+2
-4
wincolor_sink-inl.h
include/spdlog/sinks/wincolor_sink-inl.h
+0
-3
wincolor_sink.h
include/spdlog/sinks/wincolor_sink.h
+2
-2
test_pattern_formatter.cpp
tests/test_pattern_formatter.cpp
+2
-5
No files found.
include/spdlog/common.h
View file @
78c833a0
...
...
@@ -26,13 +26,11 @@
#include <windows.h>
#endif //_WIN32
#if defined(SPDLOG_WCHAR_FILENAMES) || defined(SPDLOG_WCHAR_TO_UTF8_SUPPORT)
#include <codecvt>
#include <locale>
#endif
#ifdef SPDLOG_COMPILED_LIB
#undef SPDLOG_HEADER_ONLY
#define SPDLOG_INLINE
...
...
include/spdlog/details/console_globals.h
View file @
78c833a0
...
...
@@ -6,7 +6,6 @@
#include "spdlog/details/null_mutex.h"
#include <mutex>
namespace
spdlog
{
namespace
details
{
...
...
include/spdlog/logger-inl.h
View file @
78c833a0
This diff is collapsed.
Click to expand it.
include/spdlog/logger.h
View file @
78c833a0
...
...
@@ -346,11 +346,10 @@ protected:
void
err_handler_
(
const
std
::
string
&
msg
);
};
void
swap
(
logger
&
a
,
logger
&
b
);
void
swap
(
logger
&
a
,
logger
&
b
);
}
// namespace spdlog
#ifdef SPDLOG_HEADER_ONLY
#include "logger-inl.h"
#endif
include/spdlog/sinks/ansicolor_sink.h
View file @
78c833a0
...
...
@@ -25,7 +25,7 @@ class ansicolor_sink : public sink
{
public
:
using
mutex_t
=
typename
ConsoleMutex
::
mutex_t
;
ansicolor_sink
(
FILE
*
target_file
,
color_mode
mode
);
ansicolor_sink
(
FILE
*
target_file
,
color_mode
mode
);
~
ansicolor_sink
()
override
=
default
;
ansicolor_sink
(
const
ansicolor_sink
&
other
)
=
delete
;
...
...
@@ -77,12 +77,11 @@ private:
void
print_range_
(
const
fmt
::
memory_buffer
&
formatted
,
size_t
start
,
size_t
end
);
};
template
<
typename
ConsoleMutex
>
class
ansicolor_stdout_sink
:
public
ansicolor_sink
<
ConsoleMutex
>
{
public
:
explicit
ansicolor_stdout_sink
(
color_mode
mode
=
color_mode
::
automatic
);
explicit
ansicolor_stdout_sink
(
color_mode
mode
=
color_mode
::
automatic
);
};
template
<
typename
ConsoleMutex
>
...
...
@@ -92,7 +91,6 @@ public:
explicit
ansicolor_stderr_sink
(
color_mode
mode
=
color_mode
::
automatic
);
};
using
ansicolor_stdout_sink_mt
=
ansicolor_stdout_sink
<
details
::
console_mutex
>
;
using
ansicolor_stdout_sink_st
=
ansicolor_stdout_sink
<
details
::
console_nullmutex
>
;
...
...
include/spdlog/sinks/wincolor_sink-inl.h
View file @
78c833a0
...
...
@@ -125,7 +125,6 @@ void SPDLOG_INLINE wincolor_sink<ConsoleMutex>::print_range_(const fmt::memory_b
::
WriteConsoleA
(
out_handle_
,
formatted
.
data
()
+
start
,
size
,
nullptr
,
nullptr
);
}
// wincolor_stdout_sink
template
<
typename
ConsoleMutex
>
SPDLOG_INLINE
wincolor_stdout_sink
<
ConsoleMutex
>::
wincolor_stdout_sink
(
color_mode
mode
)
...
...
@@ -138,6 +137,5 @@ SPDLOG_INLINE wincolor_stderr_sink<ConsoleMutex>::wincolor_stderr_sink(color_mod
:
wincolor_sink
<
ConsoleMutex
>
(
::
GetStdHandle
(
STD_ERROR_HANDLE
),
mode
)
{}
}
// namespace sinks
}
// namespace spdlog
\ No newline at end of file
include/spdlog/sinks/wincolor_sink.h
View file @
78c833a0
...
...
@@ -62,14 +62,14 @@ template<typename ConsoleMutex>
class
wincolor_stdout_sink
:
public
wincolor_sink
<
ConsoleMutex
>
{
public
:
explicit
wincolor_stdout_sink
(
color_mode
mode
=
color_mode
::
automatic
);
explicit
wincolor_stdout_sink
(
color_mode
mode
=
color_mode
::
automatic
);
};
template
<
typename
ConsoleMutex
>
class
wincolor_stderr_sink
:
public
wincolor_sink
<
ConsoleMutex
>
{
public
:
explicit
wincolor_stderr_sink
(
color_mode
mode
=
color_mode
::
automatic
);
explicit
wincolor_stderr_sink
(
color_mode
mode
=
color_mode
::
automatic
);
};
using
wincolor_stdout_sink_mt
=
wincolor_stdout_sink
<
details
::
console_mutex
>
;
...
...
tests/test_pattern_formatter.cpp
View file @
78c833a0
...
...
@@ -264,14 +264,12 @@ static const char *test_path = "\\a\\b\\myfile.cpp";
static
const
char
*
test_path
=
"/a/b//myfile.cpp"
;
#endif
TEST_CASE
(
"short filename formatter-1"
,
"[pattern_formatter]"
)
{
spdlog
::
pattern_formatter
formatter
(
"%s"
,
spdlog
::
pattern_time_type
::
local
,
""
);
fmt
::
memory_buffer
formatted
;
std
::
string
logger_name
=
"logger-name"
;
spdlog
::
source_loc
source_loc
{
test_path
,
123
,
"some_func()"
};
spdlog
::
source_loc
source_loc
{
test_path
,
123
,
"some_func()"
};
spdlog
::
details
::
log_msg
msg
(
source_loc
,
"logger-name"
,
spdlog
::
level
::
info
,
"Hello"
);
formatter
.
format
(
msg
,
formatted
);
REQUIRE
(
fmt
::
to_string
(
formatted
)
==
"myfile.cpp"
);
...
...
@@ -304,9 +302,8 @@ TEST_CASE("full filename formatter", "[pattern_formatter]")
spdlog
::
pattern_formatter
formatter
(
"%g"
,
spdlog
::
pattern_time_type
::
local
,
""
);
fmt
::
memory_buffer
formatted
;
std
::
string
logger_name
=
"logger-name"
;
spdlog
::
source_loc
source_loc
{
test_path
,
123
,
"some_func()"
};
spdlog
::
source_loc
source_loc
{
test_path
,
123
,
"some_func()"
};
spdlog
::
details
::
log_msg
msg
(
source_loc
,
"logger-name"
,
spdlog
::
level
::
info
,
"Hello"
);
formatter
.
format
(
msg
,
formatted
);
REQUIRE
(
fmt
::
to_string
(
formatted
)
==
test_path
);
}
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