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
e76a365b
Commit
e76a365b
authored
Oct 19, 2014
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gcc fix
parent
ca1286e7
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
6 additions
and
7 deletions
+6
-7
bench.cpp
example/bench.cpp
+2
-2
example.cpp
example/example.cpp
+1
-1
fast_oss.h
include/c11log/details/fast_oss.h
+2
-2
os.h
include/c11log/details/os.h
+1
-1
pattern_formatter.h
include/c11log/details/pattern_formatter.h
+0
-1
No files found.
example/bench.cpp
View file @
e76a365b
...
...
@@ -17,8 +17,8 @@ int main(int argc, char* argv[])
{
const
unsigned
int
howmany
=
argc
<=
1
?
500000
:
atoi
(
argv
[
1
]);
//std::string pattern = "
%B %d, %Y %H:%M:%S.%e **************[%n:%l] %t";
std
::
string
pattern
=
" [%z] %t"
;
std
::
string
pattern
=
"%z
%B %d, %Y %H:%M:%S.%e **************[%n:%l] %t"
;
//
std::string pattern = " [%z] %t";
auto
formatter
=
std
::
make_shared
<
details
::
pattern_formatter
>
(
pattern
);
logger
cout_logger
(
"bench"
,
{
std
::
make_shared
<
sinks
::
stderr_sink_mt
>
()
});
...
...
example/example.cpp
View file @
e76a365b
...
...
@@ -17,7 +17,7 @@ details::fast_oss f(const std::string& what)
oss
<<
what
;
return
oss
;
}
int
main
_
(
int
,
char
*
[])
int
main
(
int
,
char
*
[])
{
auto
foss
=
f
(
"test2"
);
...
...
include/c11log/details/fast_oss.h
View file @
e76a365b
...
...
@@ -149,9 +149,9 @@ public:
_dev
.
sputn
(
s
.
data
(),
s
.
size
());
}
void
put_data
(
const
char
*
p
,
std
::
size_t
size
)
void
put_data
(
const
char
*
p
,
std
::
size_t
data_
size
)
{
_dev
.
sputn
(
p
,
size
);
_dev
.
sputn
(
p
,
data_
size
);
}
void
put_str
(
const
std
::
string
&
s
)
...
...
include/c11log/details/os.h
View file @
e76a365b
...
...
@@ -42,7 +42,7 @@ inline std::tm gmtime(const std::time_t &time_tt)
gmtime_s
(
&
tm
,
&
time_tt
);
#else
std
::
tm
tm
;
l
gmtime_r
(
&
time_tt
,
&
tm
);
gmtime_r
(
&
time_tt
,
&
tm
);
#endif
return
tm
;
}
...
...
include/c11log/details/pattern_formatter.h
View file @
e76a365b
...
...
@@ -225,7 +225,6 @@ class r_formatter :public flag_formatter
{
void
format
(
details
::
log_msg
&
msg
)
override
{
int
hours
=
to12h
(
msg
.
tm_time
);
msg
.
formatted
.
put_int
(
to12h
(
msg
.
tm_time
),
2
);
msg
.
formatted
.
putc
(
':'
);
msg
.
formatted
.
put_int
(
msg
.
tm_time
.
tm_min
,
2
);
...
...
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