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
bcfa9241
Commit
bcfa9241
authored
Jun 03, 2019
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated copyright headers
parent
eea9d613
Hide whitespace changes
Inline
Side-by-side
Showing
56 changed files
with
146 additions
and
127 deletions
+146
-127
async_bench.cpp
bench/async_bench.cpp
+2
-2
bench.cpp
bench/bench.cpp
+1
-1
async.h
include/spdlog/async.h
+1
-1
async_logger-inl.h
include/spdlog/async_logger-inl.h
+1
-1
async_logger.h
include/spdlog/async_logger.h
+1
-1
common-inl.h
include/spdlog/common-inl.h
+1
-1
common.h
include/spdlog/common.h
+1
-2
circular_q.h
include/spdlog/details/circular_q.h
+1
-1
console_globals.h
include/spdlog/details/console_globals.h
+1
-1
file_helper-inl.h
include/spdlog/details/file_helper-inl.h
+1
-1
file_helper.h
include/spdlog/details/file_helper.h
+1
-1
fmt_helper.h
include/spdlog/details/fmt_helper.h
+1
-1
log_msg-inl.h
include/spdlog/details/log_msg-inl.h
+1
-1
log_msg.h
include/spdlog/details/log_msg.h
+1
-1
mpmc_blocking_q.h
include/spdlog/details/mpmc_blocking_q.h
+1
-1
null_mutex.h
include/spdlog/details/null_mutex.h
+1
-1
os-inl.h
include/spdlog/details/os-inl.h
+3
-3
os.h
include/spdlog/details/os.h
+1
-1
pattern_formatter-inl.h
include/spdlog/details/pattern_formatter-inl.h
+45
-27
pattern_formatter.h
include/spdlog/details/pattern_formatter.h
+1
-1
periodic_worker-inl.h
include/spdlog/details/periodic_worker-inl.h
+1
-1
periodic_worker.h
include/spdlog/details/periodic_worker.h
+1
-1
registry-inl.h
include/spdlog/details/registry-inl.h
+1
-1
registry.h
include/spdlog/details/registry.h
+1
-1
synchronous_factory.h
include/spdlog/details/synchronous_factory.h
+15
-13
thread_pool-inl.h
include/spdlog/details/thread_pool-inl.h
+1
-1
thread_pool.h
include/spdlog/details/thread_pool.h
+1
-1
formatter.h
include/spdlog/formatter.h
+1
-1
logger-inl.h
include/spdlog/logger-inl.h
+1
-1
logger.h
include/spdlog/logger.h
+4
-6
android_sink.h
include/spdlog/sinks/android_sink.h
+1
-1
ansicolor_sink-inl.h
include/spdlog/sinks/ansicolor_sink-inl.h
+10
-10
ansicolor_sink.h
include/spdlog/sinks/ansicolor_sink.h
+1
-2
base_sink-inl.h
include/spdlog/sinks/base_sink-inl.h
+1
-1
base_sink.h
include/spdlog/sinks/base_sink.h
+1
-1
basic_file_sink-inl.h
include/spdlog/sinks/basic_file_sink-inl.h
+1
-1
basic_file_sink.h
include/spdlog/sinks/basic_file_sink.h
+1
-1
daily_file_sink.h
include/spdlog/sinks/daily_file_sink.h
+1
-1
dist_sink.h
include/spdlog/sinks/dist_sink.h
+1
-1
null_sink.h
include/spdlog/sinks/null_sink.h
+1
-1
ostream_sink.h
include/spdlog/sinks/ostream_sink.h
+1
-1
rotating_file_sink-inl.h
include/spdlog/sinks/rotating_file_sink-inl.h
+1
-1
rotating_file_sink.h
include/spdlog/sinks/rotating_file_sink.h
+1
-1
sink-inl.h
include/spdlog/sinks/sink-inl.h
+1
-1
sink.h
include/spdlog/sinks/sink.h
+1
-1
stdout_color_sinks-inl.h
include/spdlog/sinks/stdout_color_sinks-inl.h
+1
-1
stdout_color_sinks.h
include/spdlog/sinks/stdout_color_sinks.h
+1
-2
stdout_sinks.h
include/spdlog/sinks/stdout_sinks.h
+1
-1
syslog_sink.h
include/spdlog/sinks/syslog_sink.h
+1
-1
wincolor_sink-inl.h
include/spdlog/sinks/wincolor_sink-inl.h
+10
-10
wincolor_sink.h
include/spdlog/sinks/wincolor_sink.h
+1
-1
spdlog-inl.h
include/spdlog/spdlog-inl.h
+1
-1
spdlog.h
include/spdlog/spdlog.h
+1
-1
tweakme.h
include/spdlog/tweakme.h
+1
-1
version.h
include/spdlog/version.h
+1
-1
spdlog.cpp
src/spdlog.cpp
+9
-5
No files found.
bench/async_bench.cpp
View file @
bcfa9241
...
...
@@ -64,7 +64,7 @@ int main(int argc, char *argv[])
if
(
argc
>
3
)
{
queue_size
=
atoi
(
argv
[
3
]);
if
(
queue_size
>
500000
)
if
(
queue_size
>
500000
)
{
spdlog
::
error
(
"Max queue size allowed: 500,000"
);
exit
(
1
);
...
...
@@ -79,7 +79,7 @@ int main(int argc, char *argv[])
spdlog
::
info
(
"Messages : {:n}"
,
howmany
);
spdlog
::
info
(
"Threads : {:n}"
,
threads
);
spdlog
::
info
(
"Queue : {:n} slots"
,
queue_size
);
spdlog
::
info
(
"Queue memory : {:n} x {} = {:n} KB "
,
queue_size
,
slot_size
,
(
queue_size
*
slot_size
)
/
1024
);
spdlog
::
info
(
"Queue memory : {:n} x {} = {:n} KB "
,
queue_size
,
slot_size
,
(
queue_size
*
slot_size
)
/
1024
);
spdlog
::
info
(
"Total iters : {:n}"
,
iters
);
spdlog
::
info
(
"-------------------------------------------------"
);
...
...
bench/bench.cpp
View file @
bcfa9241
...
...
@@ -102,7 +102,7 @@ int main(int argc, char *argv[])
spdlog
::
info
(
"Messages: {:n}"
,
howmany
);
spdlog
::
info
(
"Queue size: {:n} slots"
,
queue_size
);
auto
slot_size
=
sizeof
(
spdlog
::
details
::
async_msg
);
spdlog
::
info
(
"Total queue memory: {}x{} bytes per slot = {:n} Kb "
,
queue_size
,
slot_size
,
(
queue_size
*
slot_size
)
/
1024
);
spdlog
::
info
(
"Total queue memory: {}x{} bytes per slot = {:n} Kb "
,
queue_size
,
slot_size
,
(
queue_size
*
slot_size
)
/
1024
);
spdlog
::
info
(
"**************************************************************"
);
for
(
int
i
=
0
;
i
<
iters
;
++
i
)
...
...
include/spdlog/async.h
View file @
bcfa9241
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
// Copyright(c) 2015-present
,
Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once
...
...
include/spdlog/async_logger-inl.h
View file @
bcfa9241
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
// Copyright(c) 2015-present
,
Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once
...
...
include/spdlog/async_logger.h
View file @
bcfa9241
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
// Copyright(c) 2015-present
,
Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once
...
...
include/spdlog/common-inl.h
View file @
bcfa9241
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
// Copyright(c) 2015-present
,
Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once
...
...
include/spdlog/common.h
View file @
bcfa9241
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
// Copyright(c) 2015-present
,
Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once
...
...
@@ -223,7 +223,6 @@ std::unique_ptr<T> make_unique(Args &&... args)
#endif
}
// namespace details
}
// namespace spdlog
#ifdef SPDLOG_HEADER_ONLY
...
...
include/spdlog/details/circular_q.h
View file @
bcfa9241
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
// Copyright(c) 2015-present
,
Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
// cirucal q view of std::vector.
...
...
include/spdlog/details/console_globals.h
View file @
bcfa9241
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
// Copyright(c) 2015-present
,
Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once
...
...
include/spdlog/details/file_helper-inl.h
View file @
bcfa9241
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
// Copyright(c) 2015-present
,
Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once
...
...
include/spdlog/details/file_helper.h
View file @
bcfa9241
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
// Copyright(c) 2015-present
,
Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once
...
...
include/spdlog/details/fmt_helper.h
View file @
bcfa9241
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
// Copyright(c) 2015-present
,
Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once
...
...
include/spdlog/details/log_msg-inl.h
View file @
bcfa9241
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
// Copyright(c) 2015-present
,
Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once
...
...
include/spdlog/details/log_msg.h
View file @
bcfa9241
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
// Copyright(c) 2015-present
,
Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once
...
...
include/spdlog/details/mpmc_blocking_q.h
View file @
bcfa9241
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
// Copyright(c) 2015-present
,
Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once
...
...
include/spdlog/details/null_mutex.h
View file @
bcfa9241
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
// Copyright(c) 2015-present
,
Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once
...
...
include/spdlog/details/os-inl.h
View file @
bcfa9241
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
// Copyright(c) 2015-present
,
Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once
...
...
@@ -371,8 +371,8 @@ SPDLOG_INLINE bool is_color_terminal() SPDLOG_NOEXCEPT
#ifdef _WIN32
return
true
;
#else
static
constexpr
std
::
array
<
const
char
*
,
14
>
Terms
=
{
"ansi"
,
"color"
,
"console"
,
"cygwin"
,
"gnome"
,
"konsole"
,
"kterm"
,
"linux"
,
"msys"
,
"putty"
,
"rxvt"
,
"screen"
,
"vt100"
,
"xterm"
};
static
constexpr
std
::
array
<
const
char
*
,
14
>
Terms
=
{
"ansi"
,
"color"
,
"console"
,
"cygwin"
,
"gnome"
,
"konsole"
,
"kterm"
,
"linux"
,
"msys"
,
"putty"
,
"rxvt"
,
"screen"
,
"vt100"
,
"xterm"
};
const
char
*
env_p
=
std
::
getenv
(
"TERM"
);
if
(
env_p
==
nullptr
)
...
...
include/spdlog/details/os.h
View file @
bcfa9241
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
// Copyright(c) 2015-present
,
Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once
...
...
include/spdlog/details/pattern_formatter-inl.h
View file @
bcfa9241
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
// Copyright(c) 2015-present
,
Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once
...
...
@@ -163,7 +163,7 @@ static int to12h(const tm &t)
}
// Abbreviated weekday name
static
std
::
array
<
const
char
*
,
7
>
days
{
"Sun"
,
"Mon"
,
"Tue"
,
"Wed"
,
"Thu"
,
"Fri"
,
"Sat"
};
static
std
::
array
<
const
char
*
,
7
>
days
{
"Sun"
,
"Mon"
,
"Tue"
,
"Wed"
,
"Thu"
,
"Fri"
,
"Sat"
};
class
a_formatter
:
public
flag_formatter
{
public
:
...
...
@@ -197,7 +197,7 @@ public:
};
// Abbreviated month
static
const
std
::
array
<
const
char
*
,
12
>
months
{
"Jan"
,
"Feb"
,
"Mar"
,
"Apr"
,
"May"
,
"Jun"
,
"Jul"
,
"Aug"
,
"Sept"
,
"Oct"
,
"Nov"
,
"Dec"
};
static
const
std
::
array
<
const
char
*
,
12
>
months
{
"Jan"
,
"Feb"
,
"Mar"
,
"Apr"
,
"May"
,
"Jun"
,
"Jul"
,
"Aug"
,
"Sept"
,
"Oct"
,
"Nov"
,
"Dec"
};
class
b_formatter
:
public
flag_formatter
{
public
:
...
...
@@ -214,8 +214,8 @@ public:
};
// Full month name
static
const
std
::
array
<
const
char
*
,
12
>
full_months
{
"January"
,
"February"
,
"March"
,
"April"
,
"May"
,
"June"
,
"July"
,
"August"
,
"September"
,
"October"
,
"November"
,
"December"
};
static
const
std
::
array
<
const
char
*
,
12
>
full_months
{
"January"
,
"February"
,
"March"
,
"April"
,
"May"
,
"June"
,
"July"
,
"August"
,
"September"
,
"October"
,
"November"
,
"December"
};
class
B_formatter
:
public
flag_formatter
{
...
...
@@ -305,7 +305,8 @@ class Y_formatter final : public flag_formatter
{
public
:
explicit
Y_formatter
(
padding_info
padinfo
)
:
flag_formatter
(
padinfo
){}
:
flag_formatter
(
padinfo
)
{}
void
format
(
const
details
::
log_msg
&
,
const
std
::
tm
&
tm_time
,
fmt
::
memory_buffer
&
dest
)
override
{
...
...
@@ -368,7 +369,8 @@ class I_formatter final : public flag_formatter
{
public
:
explicit
I_formatter
(
padding_info
padinfo
)
:
flag_formatter
(
padinfo
){}
:
flag_formatter
(
padinfo
)
{}
void
format
(
const
details
::
log_msg
&
,
const
std
::
tm
&
tm_time
,
fmt
::
memory_buffer
&
dest
)
override
{
...
...
@@ -383,7 +385,8 @@ class M_formatter final : public flag_formatter
{
public
:
explicit
M_formatter
(
padding_info
padinfo
)
:
flag_formatter
(
padinfo
){}
:
flag_formatter
(
padinfo
)
{}
void
format
(
const
details
::
log_msg
&
,
const
std
::
tm
&
tm_time
,
fmt
::
memory_buffer
&
dest
)
override
{
...
...
@@ -398,7 +401,8 @@ class S_formatter final : public flag_formatter
{
public
:
explicit
S_formatter
(
padding_info
padinfo
)
:
flag_formatter
(
padinfo
){}
:
flag_formatter
(
padinfo
)
{}
void
format
(
const
details
::
log_msg
&
,
const
std
::
tm
&
tm_time
,
fmt
::
memory_buffer
&
dest
)
override
{
...
...
@@ -413,7 +417,8 @@ class e_formatter final : public flag_formatter
{
public
:
explicit
e_formatter
(
padding_info
padinfo
)
:
flag_formatter
(
padinfo
){}
:
flag_formatter
(
padinfo
)
{}
void
format
(
const
details
::
log_msg
&
msg
,
const
std
::
tm
&
,
fmt
::
memory_buffer
&
dest
)
override
{
...
...
@@ -436,7 +441,8 @@ class f_formatter final : public flag_formatter
{
public
:
explicit
f_formatter
(
padding_info
padinfo
)
:
flag_formatter
(
padinfo
){}
:
flag_formatter
(
padinfo
)
{}
void
format
(
const
details
::
log_msg
&
msg
,
const
std
::
tm
&
,
fmt
::
memory_buffer
&
dest
)
override
{
...
...
@@ -459,7 +465,8 @@ class F_formatter final : public flag_formatter
{
public
:
explicit
F_formatter
(
padding_info
padinfo
)
:
flag_formatter
(
padinfo
){}
:
flag_formatter
(
padinfo
)
{}
void
format
(
const
details
::
log_msg
&
msg
,
const
std
::
tm
&
,
fmt
::
memory_buffer
&
dest
)
override
{
...
...
@@ -482,7 +489,8 @@ class E_formatter final : public flag_formatter
{
public
:
explicit
E_formatter
(
padding_info
padinfo
)
:
flag_formatter
(
padinfo
){}
:
flag_formatter
(
padinfo
)
{}
void
format
(
const
details
::
log_msg
&
msg
,
const
std
::
tm
&
,
fmt
::
memory_buffer
&
dest
)
override
{
...
...
@@ -499,7 +507,8 @@ class p_formatter final : public flag_formatter
{
public
:
explicit
p_formatter
(
padding_info
padinfo
)
:
flag_formatter
(
padinfo
){}
:
flag_formatter
(
padinfo
)
{}
void
format
(
const
details
::
log_msg
&
,
const
std
::
tm
&
tm_time
,
fmt
::
memory_buffer
&
dest
)
override
{
...
...
@@ -514,7 +523,8 @@ class r_formatter final : public flag_formatter
{
public
:
explicit
r_formatter
(
padding_info
padinfo
)
:
flag_formatter
(
padinfo
){}
:
flag_formatter
(
padinfo
)
{}
void
format
(
const
details
::
log_msg
&
,
const
std
::
tm
&
tm_time
,
fmt
::
memory_buffer
&
dest
)
override
{
...
...
@@ -536,7 +546,8 @@ class R_formatter final : public flag_formatter
{
public
:
explicit
R_formatter
(
padding_info
padinfo
)
:
flag_formatter
(
padinfo
){}
:
flag_formatter
(
padinfo
)
{}
void
format
(
const
details
::
log_msg
&
,
const
std
::
tm
&
tm_time
,
fmt
::
memory_buffer
&
dest
)
override
{
...
...
@@ -554,7 +565,8 @@ class T_formatter final : public flag_formatter
{
public
:
explicit
T_formatter
(
padding_info
padinfo
)
:
flag_formatter
(
padinfo
){}
:
flag_formatter
(
padinfo
)
{}
void
format
(
const
details
::
log_msg
&
,
const
std
::
tm
&
tm_time
,
fmt
::
memory_buffer
&
dest
)
override
{
...
...
@@ -574,9 +586,8 @@ class z_formatter final : public flag_formatter
{
public
:
explicit
z_formatter
(
padding_info
padinfo
)
:
flag_formatter
(
padinfo
){}
:
flag_formatter
(
padinfo
)
{}
z_formatter
()
=
default
;
z_formatter
(
const
z_formatter
&
)
=
delete
;
...
...
@@ -634,7 +645,8 @@ class t_formatter final : public flag_formatter
{
public
:
explicit
t_formatter
(
padding_info
padinfo
)
:
flag_formatter
(
padinfo
){}
:
flag_formatter
(
padinfo
)
{}
void
format
(
const
details
::
log_msg
&
msg
,
const
std
::
tm
&
,
fmt
::
memory_buffer
&
dest
)
override
{
...
...
@@ -656,7 +668,8 @@ class pid_formatter final : public flag_formatter
{
public
:
explicit
pid_formatter
(
padding_info
padinfo
)
:
flag_formatter
(
padinfo
){}
:
flag_formatter
(
padinfo
)
{}
void
format
(
const
details
::
log_msg
&
,
const
std
::
tm
&
,
fmt
::
memory_buffer
&
dest
)
override
{
...
...
@@ -678,7 +691,8 @@ class v_formatter final : public flag_formatter
{
public
:
explicit
v_formatter
(
padding_info
padinfo
)
:
flag_formatter
(
padinfo
){}
:
flag_formatter
(
padinfo
)
{}
void
format
(
const
details
::
log_msg
&
msg
,
const
std
::
tm
&
,
fmt
::
memory_buffer
&
dest
)
override
{
...
...
@@ -762,7 +776,8 @@ class source_location_formatter final : public flag_formatter
{
public
:
explicit
source_location_formatter
(
padding_info
padinfo
)
:
flag_formatter
(
padinfo
){}
:
flag_formatter
(
padinfo
)
{}
void
format
(
const
details
::
log_msg
&
msg
,
const
std
::
tm
&
,
fmt
::
memory_buffer
&
dest
)
override
{
...
...
@@ -791,7 +806,8 @@ class source_filename_formatter final : public flag_formatter
{
public
:
explicit
source_filename_formatter
(
padding_info
padinfo
)
:
flag_formatter
(
padinfo
){}
:
flag_formatter
(
padinfo
)
{}
void
format
(
const
details
::
log_msg
&
msg
,
const
std
::
tm
&
,
fmt
::
memory_buffer
&
dest
)
override
{
...
...
@@ -808,7 +824,8 @@ class source_linenum_formatter final : public flag_formatter
{
public
:
explicit
source_linenum_formatter
(
padding_info
padinfo
)
:
flag_formatter
(
padinfo
){}
:
flag_formatter
(
padinfo
)
{}
void
format
(
const
details
::
log_msg
&
msg
,
const
std
::
tm
&
,
fmt
::
memory_buffer
&
dest
)
override
{
...
...
@@ -833,7 +850,8 @@ class source_funcname_formatter final : public flag_formatter
{
public
:
explicit
source_funcname_formatter
(
padding_info
padinfo
)
:
flag_formatter
(
padinfo
){}
:
flag_formatter
(
padinfo
)
{}
void
format
(
const
details
::
log_msg
&
msg
,
const
std
::
tm
&
,
fmt
::
memory_buffer
&
dest
)
override
{
...
...
include/spdlog/details/pattern_formatter.h
View file @
bcfa9241
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
// Copyright(c) 2015-present
,
Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once
...
...
include/spdlog/details/periodic_worker-inl.h
View file @
bcfa9241
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
// Copyright(c) 2015-present
,
Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once
...
...
include/spdlog/details/periodic_worker.h
View file @
bcfa9241
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
// Copyright(c) 2015-present
,
Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once
...
...
include/spdlog/details/registry-inl.h
View file @
bcfa9241
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
// Copyright(c) 2015-present
,
Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once
...
...
include/spdlog/details/registry.h
View file @
bcfa9241
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
// Copyright(c) 2015-present
,
Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once
...
...
include/spdlog/details/synchronous_factory.h
View file @
bcfa9241
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
// Copyright(c) 2015-present
,
Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once
...
...
@@ -8,15 +8,17 @@
namespace
spdlog
{
// Default logger factory- creates synchronous loggers
class
logger
;
class
logger
;
struct
synchronous_factory
{
template
<
typename
Sink
,
typename
...
SinkArgs
>
static
std
::
shared_ptr
<
spdlog
::
logger
>
create
(
std
::
string
logger_name
,
SinkArgs
&&
...
args
)
{
auto
sink
=
std
::
make_shared
<
Sink
>
(
std
::
forward
<
SinkArgs
>
(
args
)...);
auto
new_logger
=
std
::
make_shared
<
spdlog
::
logger
>
(
std
::
move
(
logger_name
),
std
::
move
(
sink
));
details
::
registry
::
instance
().
initialize_logger
(
new_logger
);
return
new_logger
;
}
};
}
\ No newline at end of file
struct
synchronous_factory
{
template
<
typename
Sink
,
typename
...
SinkArgs
>
static
std
::
shared_ptr
<
spdlog
::
logger
>
create
(
std
::
string
logger_name
,
SinkArgs
&&
...
args
)
{
auto
sink
=
std
::
make_shared
<
Sink
>
(
std
::
forward
<
SinkArgs
>
(
args
)...);
auto
new_logger
=
std
::
make_shared
<
spdlog
::
logger
>
(
std
::
move
(
logger_name
),
std
::
move
(
sink
));
details
::
registry
::
instance
().
initialize_logger
(
new_logger
);
return
new_logger
;
}
};
}
// namespace spdlog
\ No newline at end of file
include/spdlog/details/thread_pool-inl.h
View file @
bcfa9241
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
// Copyright(c) 2015-present
,
Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once
...
...
include/spdlog/details/thread_pool.h
View file @
bcfa9241
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
// Copyright(c) 2015-present
,
Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once
...
...
include/spdlog/formatter.h
View file @
bcfa9241
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
// Copyright(c) 2015-present
,
Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once
...
...
include/spdlog/logger-inl.h
View file @
bcfa9241
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
// Copyright(c) 2015-present
,
Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once
...
...
include/spdlog/logger.h
View file @
bcfa9241
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
// Copyright(c) 2015-present
,
Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once
...
...
@@ -32,9 +32,9 @@ class logger
{
public
:
// Empty logger
explicit
logger
(
std
::
string
name
)
:
name_
(
std
::
move
(
name
)),
sinks_
()
explicit
logger
(
std
::
string
name
)
:
name_
(
std
::
move
(
name
))
,
sinks_
()
{}
// Logger with range on sinks
...
...
@@ -54,8 +54,6 @@ public:
:
logger
(
std
::
move
(
name
),
sinks
.
begin
(),
sinks
.
end
())
{}
virtual
~
logger
()
=
default
;
logger
(
const
logger
&
)
=
delete
;
...
...
include/spdlog/sinks/android_sink.h
View file @
bcfa9241
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
// Copyright(c) 2015-present
,
Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once
...
...
include/spdlog/sinks/ansicolor_sink-inl.h
View file @
bcfa9241
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
// Copyright(c) 2015-present
,
Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once
...
...
@@ -93,15 +93,15 @@ SPDLOG_INLINE void spdlog::sinks::ansicolor_sink<TargetStream, ConsoleMutex>::se
{
switch
(
mode
)
{
case
color_mode
:
:
always
:
should_do_colors_
=
true
;
return
;
case
color_mode
:
:
automatic
:
should_do_colors_
=
details
::
os
::
in_terminal
(
target_file_
)
&&
details
::
os
::
is_color_terminal
();
return
;
case
color_mode
:
:
never
:
should_do_colors_
=
false
;
return
;
case
color_mode
:
:
always
:
should_do_colors_
=
true
;
return
;
case
color_mode
:
:
automatic
:
should_do_colors_
=
details
::
os
::
in_terminal
(
target_file_
)
&&
details
::
os
::
is_color_terminal
();
return
;
case
color_mode
:
:
never
:
should_do_colors_
=
false
;
return
;
}
}
...
...
include/spdlog/sinks/ansicolor_sink.h
View file @
bcfa9241
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
// Copyright(c) 2015-present
,
Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once
...
...
@@ -77,7 +77,6 @@ private:
void
print_range_
(
const
fmt
::
memory_buffer
&
formatted
,
size_t
start
,
size_t
end
);
};
using
ansicolor_stdout_sink_mt
=
ansicolor_sink
<
details
::
console_stdout
,
details
::
console_mutex
>
;
using
ansicolor_stdout_sink_st
=
ansicolor_sink
<
details
::
console_stdout
,
details
::
console_nullmutex
>
;
...
...
include/spdlog/sinks/base_sink-inl.h
View file @
bcfa9241
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
// Copyright(c) 2015-present
,
Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once
...
...
include/spdlog/sinks/base_sink.h
View file @
bcfa9241
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
// Copyright(c) 2015-present
,
Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once
...
...
include/spdlog/sinks/basic_file_sink-inl.h
View file @
bcfa9241
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
// Copyright(c) 2015-present
,
Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once
...
...
include/spdlog/sinks/basic_file_sink.h
View file @
bcfa9241
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
// Copyright(c) 2015-present
,
Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once
...
...
include/spdlog/sinks/daily_file_sink.h
View file @
bcfa9241
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
// Copyright(c) 2015-present
,
Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once
...
...
include/spdlog/sinks/dist_sink.h
View file @
bcfa9241
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
// Copyright(c) 2015-present
,
Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once
...
...
include/spdlog/sinks/null_sink.h
View file @
bcfa9241
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
// Copyright(c) 2015-present
,
Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once
...
...
include/spdlog/sinks/ostream_sink.h
View file @
bcfa9241
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
// Copyright(c) 2015-present
,
Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once
...
...
include/spdlog/sinks/rotating_file_sink-inl.h
View file @
bcfa9241
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
// Copyright(c) 2015-present
,
Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once
...
...
include/spdlog/sinks/rotating_file_sink.h
View file @
bcfa9241
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
// Copyright(c) 2015-present
,
Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once
...
...
include/spdlog/sinks/sink-inl.h
View file @
bcfa9241
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
// Copyright(c) 2015-present
,
Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once
...
...
include/spdlog/sinks/sink.h
View file @
bcfa9241
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
// Copyright(c) 2015-present
,
Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once
...
...
include/spdlog/sinks/stdout_color_sinks-inl.h
View file @
bcfa9241
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
// Copyright(c) 2015-present
,
Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once
...
...
include/spdlog/sinks/stdout_color_sinks.h
View file @
bcfa9241
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
// Copyright(c) 2015-present
,
Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once
...
...
@@ -26,7 +26,6 @@ using stderr_color_sink_st = ansicolor_stderr_sink_st;
#endif
}
// namespace sinks
template
<
typename
Factory
=
spdlog
::
synchronous_factory
>
std
::
shared_ptr
<
logger
>
stdout_color_mt
(
const
std
::
string
&
logger_name
,
color_mode
mode
=
color_mode
::
automatic
);
...
...
include/spdlog/sinks/stdout_sinks.h
View file @
bcfa9241
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
// Copyright(c) 2015-present
,
Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once
...
...
include/spdlog/sinks/syslog_sink.h
View file @
bcfa9241
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
// Copyright(c) 2015-present
,
Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once
...
...
include/spdlog/sinks/wincolor_sink-inl.h
View file @
bcfa9241
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
// Copyright(c) 2015-present
,
Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once
...
...
@@ -91,15 +91,15 @@ void SPDLOG_INLINE wincolor_sink<TargetStream, ConsoleMutex>::set_color_mode(col
{
switch
(
mode
)
{
case
color_mode
:
:
always
:
case
color_mode
:
:
automatic
:
should_do_colors_
=
true
;
break
;
case
color_mode
:
:
never
:
should_do_colors_
=
false
;
break
;
default
:
should_do_colors_
=
true
;
case
color_mode
:
:
always
:
case
color_mode
:
:
automatic
:
should_do_colors_
=
true
;
break
;
case
color_mode
:
:
never
:
should_do_colors_
=
false
;
break
;
default
:
should_do_colors_
=
true
;
}
}
...
...
include/spdlog/sinks/wincolor_sink.h
View file @
bcfa9241
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
// Copyright(c) 2015-present
,
Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once
...
...
include/spdlog/spdlog-inl.h
View file @
bcfa9241
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
// Copyright(c) 2015-present
,
Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once
...
...
include/spdlog/spdlog.h
View file @
bcfa9241
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
// Copyright(c) 2015-present
,
Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
// spdlog main header file.
...
...
include/spdlog/tweakme.h
View file @
bcfa9241
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
// Copyright(c) 2015-present
,
Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once
...
...
include/spdlog/version.h
View file @
bcfa9241
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
// Copyright(c) 2015-present
,
Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#pragma once
...
...
src/spdlog.cpp
View file @
bcfa9241
// Copyright(c) 2015-present Gabi Melman & spdlog contributors.
// Copyright(c) 2015-present
,
Gabi Melman & spdlog contributors.
// Distributed under the MIT License (http://opensource.org/licenses/MIT)
#ifndef SPDLOG_COMPILED_LIB
...
...
@@ -58,10 +58,14 @@ template class spdlog::sinks::ansicolor_sink<spdlog::details::console_stderr, sp
#endif
#include "spdlog/sinks/stdout_color_sinks-inl.h"
template
std
::
shared_ptr
<
spdlog
::
logger
>
spdlog
::
stdout_color_mt
<
spdlog
::
synchronous_factory
>
(
const
std
::
string
&
logger_name
,
color_mode
mode
);
template
std
::
shared_ptr
<
spdlog
::
logger
>
spdlog
::
stdout_color_st
<
spdlog
::
synchronous_factory
>
(
const
std
::
string
&
logger_name
,
color_mode
mode
);
template
std
::
shared_ptr
<
spdlog
::
logger
>
spdlog
::
stderr_color_mt
<
spdlog
::
synchronous_factory
>
(
const
std
::
string
&
logger_name
,
color_mode
mode
);
template
std
::
shared_ptr
<
spdlog
::
logger
>
spdlog
::
stderr_color_st
<
spdlog
::
synchronous_factory
>
(
const
std
::
string
&
logger_name
,
color_mode
mode
);
template
std
::
shared_ptr
<
spdlog
::
logger
>
spdlog
::
stdout_color_mt
<
spdlog
::
synchronous_factory
>
(
const
std
::
string
&
logger_name
,
color_mode
mode
);
template
std
::
shared_ptr
<
spdlog
::
logger
>
spdlog
::
stdout_color_st
<
spdlog
::
synchronous_factory
>
(
const
std
::
string
&
logger_name
,
color_mode
mode
);
template
std
::
shared_ptr
<
spdlog
::
logger
>
spdlog
::
stderr_color_mt
<
spdlog
::
synchronous_factory
>
(
const
std
::
string
&
logger_name
,
color_mode
mode
);
template
std
::
shared_ptr
<
spdlog
::
logger
>
spdlog
::
stderr_color_st
<
spdlog
::
synchronous_factory
>
(
const
std
::
string
&
logger_name
,
color_mode
mode
);
template
std
::
shared_ptr
<
spdlog
::
logger
>
spdlog
::
stdout_color_mt
<
spdlog
::
async_factory
>
(
const
std
::
string
&
logger_name
,
color_mode
mode
);
template
std
::
shared_ptr
<
spdlog
::
logger
>
spdlog
::
stdout_color_st
<
spdlog
::
async_factory
>
(
const
std
::
string
&
logger_name
,
color_mode
mode
);
...
...
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