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
7f043452
Commit
7f043452
authored
Nov 23, 2014
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
astyle
parent
6cda714e
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
4 deletions
+6
-4
glog-bench.cpp
bench/glog-bench.cpp
+1
-1
async_logger.h
include/spdlog/async_logger.h
+3
-2
blocking_queue.h
include/spdlog/details/blocking_queue.h
+2
-1
No files found.
bench/glog-bench.cpp
View file @
7f043452
...
@@ -11,7 +11,7 @@ int main(int, char* argv[])
...
@@ -11,7 +11,7 @@ int main(int, char* argv[])
FLAGS_log_dir
=
"logs"
;
FLAGS_log_dir
=
"logs"
;
google
::
InitGoogleLogging
(
argv
[
0
]);
google
::
InitGoogleLogging
(
argv
[
0
]);
for
(
int
i
=
0
;
i
<
howmany
;
++
i
)
for
(
int
i
=
0
;
i
<
howmany
;
++
i
)
LOG
(
INFO
)
<<
"glog message # "
<<
i
<<
": This is some text for your pleasure"
;
LOG
(
INFO
)
<<
"glog message # "
<<
i
<<
": This is some text for your pleasure"
;
return
0
;
return
0
;
}
}
include/spdlog/async_logger.h
View file @
7f043452
...
@@ -37,7 +37,8 @@
...
@@ -37,7 +37,8 @@
namespace
spdlog
namespace
spdlog
{
{
namespace
sinks
{
namespace
sinks
{
class
async_sink
;
class
async_sink
;
}
}
...
@@ -57,7 +58,7 @@ protected:
...
@@ -57,7 +58,7 @@ protected:
void
_stop
()
override
;
void
_stop
()
override
;
private
:
private
:
log_clock
::
duration
_shutdown_duration
;
log_clock
::
duration
_shutdown_duration
;
std
::
unique_ptr
<
sinks
::
async_sink
>
_as
;
std
::
unique_ptr
<
sinks
::
async_sink
>
_as
;
};
};
}
}
...
...
include/spdlog/details/blocking_queue.h
View file @
7f043452
...
@@ -73,7 +73,8 @@ public:
...
@@ -73,7 +73,8 @@ public:
std
::
unique_lock
<
std
::
mutex
>
ul
(
_mutex
);
std
::
unique_lock
<
std
::
mutex
>
ul
(
_mutex
);
if
(
is_full
())
if
(
is_full
())
{
{
if
(
!
_item_popped_cond
.
wait_until
(
ul
,
clock
::
now
()
+
timeout
,
[
this
]()
{
if
(
!
_item_popped_cond
.
wait_until
(
ul
,
clock
::
now
()
+
timeout
,
[
this
]()
{
return
!
this
->
is_full
();
return
!
this
->
is_full
();
}))
}))
return
false
;
return
false
;
...
...
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