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
689960f2
Commit
689960f2
authored
Dec 18, 2014
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix syslog bug
parent
3b61f50c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
example/bench.cpp
example/bench.cpp
+4
-2
include/spdlog/sinks/syslog_sink.h
include/spdlog/sinks/syslog_sink.h
+0
-2
No files found.
example/bench.cpp
View file @
689960f2
...
@@ -64,7 +64,7 @@ int main(int argc, char* argv[])
...
@@ -64,7 +64,7 @@ int main(int argc, char* argv[])
if
(
argc
>
2
)
if
(
argc
>
2
)
threads
=
atoi
(
argv
[
2
]);
threads
=
atoi
(
argv
[
2
]);
/*
cout << "*******************************************************************************\n";
cout << "*******************************************************************************\n";
cout << "Single thread, " << format(howmany) << " iterations, auto flush=" << auto_flush << endl;
cout << "Single thread, " << format(howmany) << " iterations, auto flush=" << auto_flush << endl;
cout << "*******************************************************************************\n";
cout << "*******************************************************************************\n";
...
@@ -87,6 +87,7 @@ int main(int argc, char* argv[])
...
@@ -87,6 +87,7 @@ int main(int argc, char* argv[])
bench_mt(howmany, daily_mt, threads);
bench_mt(howmany, daily_mt, threads);
bench(howmany, spdlog::create<null_sink_st>("null_mt"));
bench(howmany, spdlog::create<null_sink_st>("null_mt"));
*/
cout
<<
"
\n
*******************************************************************************
\n
"
;
cout
<<
"
\n
*******************************************************************************
\n
"
;
cout
<<
"async logging.. "
<<
threads
<<
" threads sharing same logger, "
<<
format
(
howmany
)
<<
" iterations, auto_flush="
<<
auto_flush
<<
endl
;
cout
<<
"async logging.. "
<<
threads
<<
" threads sharing same logger, "
<<
format
(
howmany
)
<<
" iterations, auto_flush="
<<
auto_flush
<<
endl
;
cout
<<
"*******************************************************************************
\n
"
;
cout
<<
"*******************************************************************************
\n
"
;
...
@@ -96,7 +97,8 @@ int main(int argc, char* argv[])
...
@@ -96,7 +97,8 @@ int main(int argc, char* argv[])
for
(
int
i
=
0
;
i
<
5
;
++
i
)
for
(
int
i
=
0
;
i
<
5
;
++
i
)
{
{
auto
as
=
spdlog
::
daily_logger_st
(
"as"
,
"logs/daily_async"
,
auto_flush
);
//auto as = spdlog::daily_logger_st("as", "logs/daily_async", auto_flush);
auto
as
=
spdlog
::
create
<
null_sink_st
>
(
"as"
);
bench_mt
(
howmany
,
as
,
threads
);
bench_mt
(
howmany
,
as
,
threads
);
spdlog
::
drop
(
"as"
);
spdlog
::
drop
(
"as"
);
}
}
...
...
include/spdlog/sinks/syslog_sink.h
View file @
689960f2
...
@@ -58,8 +58,6 @@ public:
...
@@ -58,8 +58,6 @@ public:
_priorities
[
static_cast
<
int
>
(
level
::
CRITICAL
)]
=
LOG_CRIT
;
_priorities
[
static_cast
<
int
>
(
level
::
CRITICAL
)]
=
LOG_CRIT
;
_priorities
[
static_cast
<
int
>
(
level
::
ALERT
)]
=
LOG_ALERT
;
_priorities
[
static_cast
<
int
>
(
level
::
ALERT
)]
=
LOG_ALERT
;
_priorities
[
static_cast
<
int
>
(
level
::
EMERG
)]
=
LOG_EMERG
;
_priorities
[
static_cast
<
int
>
(
level
::
EMERG
)]
=
LOG_EMERG
;
_priorities
[
static_cast
<
int
>
(
level
::
ALWAYS
)]
=
LOG_INFO
;
_priorities
[
static_cast
<
int
>
(
level
::
OFF
)]
=
LOG_INFO
;
_priorities
[
static_cast
<
int
>
(
level
::
OFF
)]
=
LOG_INFO
;
::
openlog
(
ident
.
c_str
(),
option
,
syslog_facility_from_name
(
facility
));
::
openlog
(
ident
.
c_str
(),
option
,
syslog_facility_from_name
(
facility
));
...
...
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