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
0f76db88
Commit
0f76db88
authored
Nov 28, 2015
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
astyle
parent
992a4e60
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
39 additions
and
24 deletions
+39
-24
async_log_helper.h
include/spdlog/details/async_log_helper.h
+2
-1
async_logger_impl.h
include/spdlog/details/async_logger_impl.h
+2
-1
file_helper.h
include/spdlog/details/file_helper.h
+2
-1
format.h
include/spdlog/details/format.h
+0
-0
logger_impl.h
include/spdlog/details/logger_impl.h
+5
-2
os.h
include/spdlog/details/os.h
+2
-2
pattern_formatter_impl.h
include/spdlog/details/pattern_formatter_impl.h
+1
-1
registry.h
include/spdlog/details/registry.h
+1
-1
android_sink.h
include/spdlog/sinks/android_sink.h
+22
-12
dist_sink.h
include/spdlog/sinks/dist_sink.h
+1
-1
file_sinks.h
include/spdlog/sinks/file_sinks.h
+1
-2
No files found.
include/spdlog/details/async_log_helper.h
View file @
0f76db88
...
...
@@ -249,7 +249,8 @@ inline void spdlog::details::async_log_helper::push_msg(details::async_log_helpe
{
now
=
details
::
os
::
now
();
sleep_or_yield
(
now
,
last_op_time
);
}
while
(
!
_q
.
enqueue
(
std
::
move
(
new_msg
)));
}
while
(
!
_q
.
enqueue
(
std
::
move
(
new_msg
)));
}
}
...
...
include/spdlog/details/async_logger_impl.h
View file @
0f76db88
...
...
@@ -60,7 +60,8 @@ inline spdlog::async_logger::async_logger(const std::string& logger_name,
const
async_overflow_policy
overflow_policy
,
const
std
::
function
<
void
()
>&
worker_warmup_cb
,
const
std
::
chrono
::
milliseconds
&
flush_interval_ms
)
:
async_logger
(
logger_name
,
{
async_logger
(
logger_name
,
{
single_sink
},
queue_size
,
overflow_policy
,
worker_warmup_cb
,
flush_interval_ms
)
{}
...
...
include/spdlog/details/file_helper.h
View file @
0f76db88
...
...
@@ -87,7 +87,8 @@ public:
}
void
flush
()
{
void
flush
()
{
std
::
fflush
(
_fd
);
}
...
...
include/spdlog/details/format.h
View file @
0f76db88
This diff is collapsed.
Click to expand it.
include/spdlog/details/logger_impl.h
View file @
0f76db88
...
...
@@ -50,7 +50,8 @@ inline spdlog::logger::logger(const std::string& logger_name, sinks_init_list si
// ctor with single sink
inline
spdlog
::
logger
::
logger
(
const
std
::
string
&
logger_name
,
spdlog
::
sink_ptr
single_sink
)
:
logger
(
logger_name
,
{
logger
(
logger_name
,
{
single_sink
})
{}
...
...
@@ -314,7 +315,8 @@ inline void spdlog::logger::_set_formatter(formatter_ptr msg_formatter)
_formatter
=
msg_formatter
;
}
inline
void
spdlog
::
logger
::
flush
()
{
inline
void
spdlog
::
logger
::
flush
()
{
for
(
auto
&
sink
:
_sinks
)
sink
->
flush
();
}
\ No newline at end of file
include/spdlog/details/os.h
View file @
0f76db88
...
...
@@ -167,8 +167,8 @@ inline int utc_minutes_offset(const std::tm& tm = details::os::localtime())
#ifdef _WIN32
(
void
)
tm
;
// avoid unused param warning
#if _WIN32_WINNT < _WIN32_WINNT_WS08
TIME_ZONE_INFORMATION
tzinfo
;
auto
rv
=
GetTimeZoneInformation
(
&
tzinfo
);
TIME_ZONE_INFORMATION
tzinfo
;
auto
rv
=
GetTimeZoneInformation
(
&
tzinfo
);
#else
DYNAMIC_TIME_ZONE_INFORMATION
tzinfo
;
auto
rv
=
GetDynamicTimeZoneInformation
(
&
tzinfo
);
...
...
include/spdlog/details/pattern_formatter_impl.h
View file @
0f76db88
...
...
@@ -500,7 +500,7 @@ inline void spdlog::pattern_formatter::handle_flag(char flag)
{
switch
(
flag
)
{
// logger name
// logger name
case
'n'
:
_formatters
.
push_back
(
std
::
unique_ptr
<
details
::
flag_formatter
>
(
new
details
::
name_formatter
()));
break
;
...
...
include/spdlog/details/registry.h
View file @
0f76db88
...
...
@@ -158,7 +158,7 @@ private:
throw
spdlog_ex
(
"logger with name "
+
logger_name
+
" already exists"
);
_loggers
[
logger
->
name
()]
=
logger
;
}
registry_t
<
Mutex
>
(){}
registry_t
<
Mutex
>
()
{}
registry_t
<
Mutex
>
(
const
registry_t
<
Mutex
>&
)
=
delete
;
registry_t
<
Mutex
>&
operator
=
(
const
registry_t
<
Mutex
>&
)
=
delete
;
Mutex
_mutex
;
...
...
include/spdlog/sinks/android_sink.h
View file @
0f76db88
...
...
@@ -58,8 +58,8 @@ protected:
const
android_LogPriority
priority
=
convert_to_android
(
msg
.
level
);
const
int
expected_size
=
msg
.
formatted
.
size
();
const
int
size
=
__android_log_write
(
priority
,
_tag
.
c_str
(),
msg
.
formatted
.
c_str
()
);
priority
,
_tag
.
c_str
(),
msg
.
formatted
.
c_str
()
);
if
(
size
>
expected_size
)
{
// Will write a little bit more than original message
...
...
@@ -75,16 +75,26 @@ private:
{
switch
(
level
)
{
case
spdlog
:
:
level
::
trace
:
return
ANDROID_LOG_VERBOSE
;
case
spdlog
:
:
level
::
debug
:
return
ANDROID_LOG_DEBUG
;
case
spdlog
:
:
level
::
info
:
return
ANDROID_LOG_INFO
;
case
spdlog
:
:
level
::
notice
:
return
ANDROID_LOG_INFO
;
case
spdlog
:
:
level
::
warn
:
return
ANDROID_LOG_WARN
;
case
spdlog
:
:
level
::
err
:
return
ANDROID_LOG_ERROR
;
case
spdlog
:
:
level
::
critical
:
return
ANDROID_LOG_FATAL
;
case
spdlog
:
:
level
::
alert
:
return
ANDROID_LOG_FATAL
;
case
spdlog
:
:
level
::
emerg
:
return
ANDROID_LOG_FATAL
;
default
:
throw
spdlog_ex
(
"Incorrect level value"
);
case
spdlog
:
:
level
::
trace
:
return
ANDROID_LOG_VERBOSE
;
case
spdlog
:
:
level
::
debug
:
return
ANDROID_LOG_DEBUG
;
case
spdlog
:
:
level
::
info
:
return
ANDROID_LOG_INFO
;
case
spdlog
:
:
level
::
notice
:
return
ANDROID_LOG_INFO
;
case
spdlog
:
:
level
::
warn
:
return
ANDROID_LOG_WARN
;
case
spdlog
:
:
level
::
err
:
return
ANDROID_LOG_ERROR
;
case
spdlog
:
:
level
::
critical
:
return
ANDROID_LOG_FATAL
;
case
spdlog
:
:
level
::
alert
:
return
ANDROID_LOG_FATAL
;
case
spdlog
:
:
level
::
emerg
:
return
ANDROID_LOG_FATAL
;
default
:
throw
spdlog_ex
(
"Incorrect level value"
);
}
}
...
...
include/spdlog/sinks/dist_sink.h
View file @
0f76db88
...
...
@@ -69,7 +69,7 @@ public:
{
std
::
lock_guard
<
Mutex
>
lock
(
base_sink
<
Mutex
>::
_mutex
);
if
(
sink
&&
_sinks
.
end
()
==
std
::
find
(
_sinks
.
begin
(),
_sinks
.
end
(),
sink
))
_sinks
.
end
()
==
std
::
find
(
_sinks
.
begin
(),
_sinks
.
end
(),
sink
))
{
_sinks
.
push_back
(
sink
);
}
...
...
include/spdlog/sinks/file_sinks.h
View file @
0f76db88
...
...
@@ -230,4 +230,4 @@ private:
typedef
daily_file_sink
<
std
::
mutex
>
daily_file_sink_mt
;
typedef
daily_file_sink
<
details
::
null_mutex
>
daily_file_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