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
f14d1c00
Commit
f14d1c00
authored
Oct 12, 2016
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
astyle
parent
0cfdad4d
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
48 additions
and
47 deletions
+48
-47
g3log-crush.cpp
bench/latency/g3log-crush.cpp
+0
-0
spdlog-null-async.cpp
bench/spdlog-null-async.cpp
+0
-0
example.cpp
example/example.cpp
+0
-0
file_helper.h
include/spdlog/details/file_helper.h
+0
-0
spdlog_impl.h
include/spdlog/details/spdlog_impl.h
+0
-0
file_sinks.h
include/spdlog/sinks/file_sinks.h
+0
-0
stdout_sinks.h
include/spdlog/sinks/stdout_sinks.h
+17
-17
wincolor_sink.h
include/spdlog/sinks/wincolor_sink.h
+31
-30
No files found.
bench/latency/g3log-crush.cpp
View file @
f14d1c00
bench/spdlog-null-async.cpp
View file @
f14d1c00
example/example.cpp
View file @
f14d1c00
include/spdlog/details/file_helper.h
View file @
f14d1c00
include/spdlog/details/spdlog_impl.h
View file @
f14d1c00
include/spdlog/sinks/file_sinks.h
View file @
f14d1c00
include/spdlog/sinks/stdout_sinks.h
View file @
f14d1c00
...
...
@@ -14,14 +14,14 @@
namespace
spdlog
{
namespace
sinks
{
namespace
sinks
{
template
<
class
Mutex
>
class
stdout_sink
:
public
base_sink
<
Mutex
>
{
template
<
class
Mutex
>
class
stdout_sink
:
public
base_sink
<
Mutex
>
{
using
MyType
=
stdout_sink
<
Mutex
>
;
public
:
public
:
stdout_sink
()
{}
static
std
::
shared_ptr
<
MyType
>
instance
()
...
...
@@ -40,17 +40,17 @@ namespace spdlog
{
fflush
(
stdout
);
}
};
};
typedef
stdout_sink
<
details
::
null_mutex
>
stdout_sink_st
;
typedef
stdout_sink
<
std
::
mutex
>
stdout_sink_mt
;
typedef
stdout_sink
<
details
::
null_mutex
>
stdout_sink_st
;
typedef
stdout_sink
<
std
::
mutex
>
stdout_sink_mt
;
template
<
class
Mutex
>
class
stderr_sink
:
public
base_sink
<
Mutex
>
{
template
<
class
Mutex
>
class
stderr_sink
:
public
base_sink
<
Mutex
>
{
using
MyType
=
stderr_sink
<
Mutex
>
;
public
:
public
:
stderr_sink
()
{}
static
std
::
shared_ptr
<
MyType
>
instance
()
...
...
@@ -69,9 +69,9 @@ namespace spdlog
{
fflush
(
stderr
);
}
};
};
typedef
stderr_sink
<
std
::
mutex
>
stderr_sink_mt
;
typedef
stderr_sink
<
details
::
null_mutex
>
stderr_sink_st
;
}
typedef
stderr_sink
<
std
::
mutex
>
stderr_sink_mt
;
typedef
stderr_sink
<
details
::
null_mutex
>
stderr_sink_st
;
}
}
include/spdlog/sinks/wincolor_sink.h
View file @
f14d1c00
...
...
@@ -16,15 +16,15 @@
namespace
spdlog
{
namespace
sinks
{
/*
namespace
sinks
{
/*
* Windows color console sink. Uses WriteConsoleA to write to the console with colors
*/
template
<
class
Mutex
>
class
wincolor_sink
:
public
base_sink
<
Mutex
>
{
public
:
template
<
class
Mutex
>
class
wincolor_sink
:
public
base_sink
<
Mutex
>
{
public
:
const
WORD
BOLD
=
FOREGROUND_INTENSITY
;
const
WORD
RED
=
FOREGROUND_RED
;
const
WORD
CYAN
=
FOREGROUND_GREEN
|
FOREGROUND_BLUE
;
...
...
@@ -70,7 +70,7 @@ namespace spdlog
colors_
[
level
]
=
color
;
}
private
:
private
:
HANDLE
out_handle_
;
std
::
map
<
level
::
level_enum
,
WORD
>
colors_
;
...
...
@@ -82,35 +82,35 @@ namespace spdlog
SetConsoleTextAttribute
(
out_handle_
,
attribs
);
return
orig_buffer_info
.
wAttributes
;
//return orig attribs
}
};
};
//
// windows color console to stdout
//
template
<
class
Mutex
>
class
wincolor_stdout_sink
:
public
wincolor_sink
<
Mutex
>
{
public
:
//
// windows color console to stdout
//
template
<
class
Mutex
>
class
wincolor_stdout_sink
:
public
wincolor_sink
<
Mutex
>
{
public
:
wincolor_stdout_sink
()
:
wincolor_sink
(
GetStdHandle
(
STD_OUTPUT_HANDLE
))
{}
};
};
typedef
wincolor_stdout_sink
<
std
::
mutex
>
wincolor_stdout_sink_mt
;
typedef
wincolor_stdout_sink
<
details
::
null_mutex
>
wincolor_stdout_sink_st
;
typedef
wincolor_stdout_sink
<
std
::
mutex
>
wincolor_stdout_sink_mt
;
typedef
wincolor_stdout_sink
<
details
::
null_mutex
>
wincolor_stdout_sink_st
;
//
// windows color console to stderr
//
template
<
class
Mutex
>
class
wincolor_stderr_sink
:
public
wincolor_sink
<
Mutex
>
{
public
:
//
// windows color console to stderr
//
template
<
class
Mutex
>
class
wincolor_stderr_sink
:
public
wincolor_sink
<
Mutex
>
{
public
:
wincolor_stderr_sink
()
:
wincolor_sink
(
GetStdHandle
(
STD_ERROR_HANDLE
))
{}
};
};
typedef
wincolor_stderr_sink
<
std
::
mutex
>
wincolor_stderr_sink_mt
;
typedef
wincolor_stderr_sink
<
details
::
null_mutex
>
wincolor_stderr_sink_st
;
typedef
wincolor_stderr_sink
<
std
::
mutex
>
wincolor_stderr_sink_mt
;
typedef
wincolor_stderr_sink
<
details
::
null_mutex
>
wincolor_stderr_sink_st
;
}
}
}
\ No newline at end of file
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