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
5d23e88c
Commit
5d23e88c
authored
Dec 02, 2016
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
astyle
parent
6d8efa8d
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
19 deletions
+19
-19
include/spdlog/details/os.h
include/spdlog/details/os.h
+2
-2
include/spdlog/details/pattern_formatter_impl.h
include/spdlog/details/pattern_formatter_impl.h
+3
-3
include/spdlog/fmt/bundled/format.h
include/spdlog/fmt/bundled/format.h
+11
-11
include/spdlog/sinks/wincolor_sink.h
include/spdlog/sinks/wincolor_sink.h
+3
-3
No files found.
include/spdlog/details/os.h
View file @
5d23e88c
...
@@ -316,7 +316,7 @@ inline size_t _thread_id()
...
@@ -316,7 +316,7 @@ inline size_t _thread_id()
inline
size_t
thread_id
()
inline
size_t
thread_id
()
{
{
static
thread_local
const
size_t
tid
=
_thread_id
();
static
thread_local
const
size_t
tid
=
_thread_id
();
return
tid
;
return
tid
;
}
}
...
@@ -364,7 +364,7 @@ inline std::string errno_str(int err_num)
...
@@ -364,7 +364,7 @@ inline std::string errno_str(int err_num)
#endif
#endif
}
}
inline
int
pid
()
inline
int
pid
()
{
{
#ifdef _WIN32
#ifdef _WIN32
...
...
include/spdlog/details/pattern_formatter_impl.h
View file @
5d23e88c
...
@@ -365,12 +365,12 @@ class t_formatter:public flag_formatter
...
@@ -365,12 +365,12 @@ class t_formatter:public flag_formatter
}
}
};
};
// Current pid
// Current pid
class
pid_formatter
:
public
flag_formatter
class
pid_formatter
:
public
flag_formatter
{
{
void
format
(
details
::
log_msg
&
msg
,
const
std
::
tm
&
)
override
void
format
(
details
::
log_msg
&
msg
,
const
std
::
tm
&
)
override
{
{
msg
.
formatted
<<
details
::
os
::
pid
();
msg
.
formatted
<<
details
::
os
::
pid
();
}
}
};
};
...
@@ -507,7 +507,7 @@ inline void spdlog::pattern_formatter::handle_flag(char flag)
...
@@ -507,7 +507,7 @@ inline void spdlog::pattern_formatter::handle_flag(char flag)
{
{
switch
(
flag
)
switch
(
flag
)
{
{
// logger name
// logger name
case
'n'
:
case
'n'
:
_formatters
.
push_back
(
std
::
unique_ptr
<
details
::
flag_formatter
>
(
new
details
::
name_formatter
()));
_formatters
.
push_back
(
std
::
unique_ptr
<
details
::
flag_formatter
>
(
new
details
::
name_formatter
()));
break
;
break
;
...
...
include/spdlog/fmt/bundled/format.h
View file @
5d23e88c
...
@@ -475,7 +475,7 @@ template <typename Impl, typename Char>
...
@@ -475,7 +475,7 @@ template <typename Impl, typename Char>
class
BasicPrintfArgFormatter
;
class
BasicPrintfArgFormatter
;
template
<
typename
CharType
,
template
<
typename
CharType
,
typename
ArgFormatter
=
fmt
::
ArgFormatter
<
CharType
>
>
typename
ArgFormatter
=
fmt
::
ArgFormatter
<
CharType
>
>
class
BasicFormatter
;
class
BasicFormatter
;
/**
/**
...
@@ -2647,15 +2647,15 @@ inline uint64_t make_type(const T &arg)
...
@@ -2647,15 +2647,15 @@ inline uint64_t make_type(const T &arg)
}
}
template
<
unsigned
N
,
bool
/*IsPacked*/
=
(
N
<
ArgList
::
MAX_PACKED_ARGS
)>
template
<
unsigned
N
,
bool
/*IsPacked*/
=
(
N
<
ArgList
::
MAX_PACKED_ARGS
)>
struct
ArgArray
;
struct
ArgArray
;
template
<
unsigned
N
>
template
<
unsigned
N
>
struct
ArgArray
<
N
,
true
/*IsPacked*/
>
struct
ArgArray
<
N
,
true
/*IsPacked*/
>
{
{
typedef
Value
Type
[
N
>
0
?
N
:
1
];
typedef
Value
Type
[
N
>
0
?
N
:
1
];
template
<
typename
Formatter
,
typename
T
>
template
<
typename
Formatter
,
typename
T
>
static
Value
make
(
const
T
&
value
)
static
Value
make
(
const
T
&
value
)
{
{
#ifdef __clang__
#ifdef __clang__
Value
result
=
MakeValue
<
Formatter
>
(
value
);
Value
result
=
MakeValue
<
Formatter
>
(
value
);
...
@@ -2667,7 +2667,7 @@ static Value make(const T &value)
...
@@ -2667,7 +2667,7 @@ static Value make(const T &value)
return
MakeValue
<
Formatter
>
(
value
);
return
MakeValue
<
Formatter
>
(
value
);
#endif
#endif
}
}
};
};
template
<
unsigned
N
>
template
<
unsigned
N
>
struct
ArgArray
<
N
,
false
/*IsPacked*/
>
struct
ArgArray
<
N
,
false
/*IsPacked*/
>
...
@@ -3513,7 +3513,7 @@ void BasicWriter<Char>::write_double(T value, const FormatSpec &spec)
...
@@ -3513,7 +3513,7 @@ void BasicWriter<Char>::write_double(T value, const FormatSpec &spec)
// MSVC's printf doesn't support 'F'.
// MSVC's printf doesn't support 'F'.
type
=
'f'
;
type
=
'f'
;
#endif
#endif
// Fall through.
// Fall through.
case
'E'
:
case
'E'
:
case
'G'
:
case
'G'
:
case
'A'
:
case
'A'
:
...
@@ -4571,7 +4571,7 @@ struct UdlArg
...
@@ -4571,7 +4571,7 @@ struct UdlArg
template
<
typename
T
>
template
<
typename
T
>
NamedArgWithType
<
Char
,
T
>
operator
=
(
T
&&
value
)
const
NamedArgWithType
<
Char
,
T
>
operator
=
(
T
&&
value
)
const
{
{
return
{
str
,
std
::
forward
<
T
>
(
value
)
};
return
{
str
,
std
::
forward
<
T
>
(
value
)
};
}
}
};
};
...
@@ -4593,12 +4593,12 @@ std::string message = "The answer is {}"_format(42);
...
@@ -4593,12 +4593,12 @@ std::string message = "The answer is {}"_format(42);
inline
internal
::
UdlFormat
<
char
>
inline
internal
::
UdlFormat
<
char
>
operator
""
_format
(
const
char
*
s
,
std
::
size_t
)
operator
""
_format
(
const
char
*
s
,
std
::
size_t
)
{
{
return
{
s
};
return
{
s
};
}
}
inline
internal
::
UdlFormat
<
wchar_t
>
inline
internal
::
UdlFormat
<
wchar_t
>
operator
""
_format
(
const
wchar_t
*
s
,
std
::
size_t
)
operator
""
_format
(
const
wchar_t
*
s
,
std
::
size_t
)
{
{
return
{
s
};
return
{
s
};
}
}
/**
/**
...
@@ -4614,12 +4614,12 @@ print("Elapsed time: {s:.2f} seconds", "s"_a=1.23);
...
@@ -4614,12 +4614,12 @@ print("Elapsed time: {s:.2f} seconds", "s"_a=1.23);
inline
internal
::
UdlArg
<
char
>
inline
internal
::
UdlArg
<
char
>
operator
""
_a
(
const
char
*
s
,
std
::
size_t
)
operator
""
_a
(
const
char
*
s
,
std
::
size_t
)
{
{
return
{
s
};
return
{
s
};
}
}
inline
internal
::
UdlArg
<
wchar_t
>
inline
internal
::
UdlArg
<
wchar_t
>
operator
""
_a
(
const
wchar_t
*
s
,
std
::
size_t
)
operator
""
_a
(
const
wchar_t
*
s
,
std
::
size_t
)
{
{
return
{
s
};
return
{
s
};
}
}
}
// inline namespace literals
}
// inline namespace literals
...
...
include/spdlog/sinks/wincolor_sink.h
View file @
5d23e88c
...
@@ -66,7 +66,7 @@ public:
...
@@ -66,7 +66,7 @@ public:
// change the color for the given level
// change the color for the given level
void
set_color
(
level
::
level_enum
level
,
WORD
color
)
void
set_color
(
level
::
level_enum
level
,
WORD
color
)
{
{
std
::
lock_guard
<
Mutex
>
lock
(
base_sink
<
Mutex
>::
_mutex
);
std
::
lock_guard
<
Mutex
>
lock
(
base_sink
<
Mutex
>::
_mutex
);
colors_
[
level
]
=
color
;
colors_
[
level
]
=
color
;
}
}
...
@@ -91,7 +91,7 @@ template<class Mutex>
...
@@ -91,7 +91,7 @@ template<class Mutex>
class
wincolor_stdout_sink
:
public
wincolor_sink
<
Mutex
>
class
wincolor_stdout_sink
:
public
wincolor_sink
<
Mutex
>
{
{
public:
public:
wincolor_stdout_sink
()
:
wincolor_sink
<
Mutex
>
(
GetStdHandle
(
STD_OUTPUT_HANDLE
))
wincolor_stdout_sink
()
:
wincolor_sink
<
Mutex
>
(
GetStdHandle
(
STD_OUTPUT_HANDLE
))
{}
{}
};
};
...
@@ -105,7 +105,7 @@ template<class Mutex>
...
@@ -105,7 +105,7 @@ template<class Mutex>
class
wincolor_stderr_sink
:
public
wincolor_sink
<
Mutex
>
class
wincolor_stderr_sink
:
public
wincolor_sink
<
Mutex
>
{
{
public:
public:
wincolor_stderr_sink
()
:
wincolor_sink
<
Mutex
>
(
GetStdHandle
(
STD_ERROR_HANDLE
))
wincolor_stderr_sink
()
:
wincolor_sink
<
Mutex
>
(
GetStdHandle
(
STD_ERROR_HANDLE
))
{}
{}
};
};
...
...
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