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
4e3e8010
Commit
4e3e8010
authored
Oct 19, 2018
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code formatting
parent
70bef682
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
8 deletions
+7
-8
bench.cpp
bench/bench.cpp
+5
-5
example.cpp
example/example.cpp
+1
-1
fmt_helper.h
include/spdlog/details/fmt_helper.h
+1
-1
logger_impl.h
include/spdlog/details/logger_impl.h
+0
-1
No files found.
bench/bench.cpp
View file @
4e3e8010
...
...
@@ -192,11 +192,11 @@ void bench_default_api(int howmany, std::shared_ptr<spdlog::logger> log)
void
bench_c_string
(
int
howmany
,
std
::
shared_ptr
<
spdlog
::
logger
>
log
)
{
const
char
*
msg
=
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum pharetra metus cursus "
\
"lacus placerat congue. Nulla egestas, mauris a tincidunt tempus, enim lectus volutpat mi, eu consequat sem "
\
"libero nec massa. In dapibus ipsum a diam rhoncus gravida. Etiam non dapibus eros. Donec fringilla dui sed "
\
"augue pretium, nec scelerisque est maximus. Nullam convallis, sem nec blandit maximus, nisi turpis ornare "
\
"nisl, sit amet volutpat neque massa eu odio. Maecenas malesuada quam ex, posuere congue nibh turpis duis."
;
const
char
*
msg
=
"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum pharetra metus cursus "
"lacus placerat congue. Nulla egestas, mauris a tincidunt tempus, enim lectus volutpat mi, eu consequat sem "
"libero nec massa. In dapibus ipsum a diam rhoncus gravida. Etiam non dapibus eros. Donec fringilla dui sed "
"augue pretium, nec scelerisque est maximus. Nullam convallis, sem nec blandit maximus, nisi turpis ornare "
"nisl, sit amet volutpat neque massa eu odio. Maecenas malesuada quam ex, posuere congue nibh turpis duis."
;
using
std
::
chrono
::
high_resolution_clock
;
auto
orig_default
=
spdlog
::
default_logger
();
spdlog
::
set_default_logger
(
log
);
...
...
example/example.cpp
View file @
4e3e8010
...
...
@@ -147,7 +147,7 @@ void async_example()
void
binary_example
()
{
std
::
vector
<
char
>
buf
;
for
(
int
i
=
0
;
i
<
80
;
i
++
)
for
(
int
i
=
0
;
i
<
80
;
i
++
)
{
buf
.
push_back
(
static_cast
<
char
>
(
i
&
0xff
));
}
...
...
include/spdlog/details/fmt_helper.h
View file @
4e3e8010
...
...
@@ -29,7 +29,7 @@ template<size_t Buffer_Size>
inline
void
append_string_view
(
fmt
::
string_view
view
,
fmt
::
basic_memory_buffer
<
char
,
Buffer_Size
>
&
dest
)
{
auto
*
buf_ptr
=
view
.
data
();
if
(
buf_ptr
!=
nullptr
)
if
(
buf_ptr
!=
nullptr
)
{
dest
.
append
(
buf_ptr
,
buf_ptr
+
view
.
size
());
}
...
...
include/spdlog/details/logger_impl.h
View file @
4e3e8010
...
...
@@ -218,7 +218,6 @@ inline void spdlog::logger::log(level::level_enum lvl, const wchar_t *fmt, const
wbuf_to_utf8buf
(
wbuf
,
buf
);
details
::
log_msg
log_msg
(
&
name_
,
lvl
,
to_string_view
(
buf
));
sink_it_
(
log_msg
);
}
SPDLOG_CATCH_AND_HANDLE
}
...
...
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