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
2671b48a
Commit
2671b48a
authored
Nov 24, 2018
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor performance fix in full formatter
parent
38247825
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
pattern_formatter.h
include/spdlog/details/pattern_formatter.h
+9
-7
No files found.
include/spdlog/details/pattern_formatter.h
View file @
2671b48a
...
...
@@ -947,9 +947,8 @@ public:
auto
millis
=
fmt_helper
::
time_fraction
<
milliseconds
>
(
msg
.
time
);
fmt_helper
::
pad3
(
static_cast
<
uint32_t
>
(
millis
.
count
()),
dest
);
string_view_t
closing_bracket
{
"] "
,
2
};
fmt_helper
::
append_string_view
(
closing_bracket
,
dest
);
dest
.
push_back
(
']'
);
dest
.
push_back
(
' '
);
#else // no datetime needed
(
void
)
tm_time
;
...
...
@@ -961,7 +960,8 @@ public:
dest
.
push_back
(
'['
);
// fmt_helper::append_str(*msg.logger_name, dest);
fmt_helper
::
append_string_view
(
*
msg
.
logger_name
,
dest
);
fmt_helper
::
append_string_view
(
closing_bracket
,
dest
);
dest
.
push_back
(
']'
);
dest
.
push_back
(
' '
);
}
#endif
...
...
@@ -971,16 +971,18 @@ public:
// fmt_helper::append_string_view(level::to_c_str(msg.level), dest);
fmt_helper
::
append_string_view
(
level
::
to_c_str
(
msg
.
level
),
dest
);
msg
.
color_range_end
=
dest
.
size
();
fmt_helper
::
append_string_view
(
closing_bracket
,
dest
);
dest
.
push_back
(
']'
);
dest
.
push_back
(
' '
);
// add so
ru
ce location if present
// add so
ur
ce location if present
if
(
!
msg
.
source
.
empty
())
{
dest
.
push_back
(
'['
);
fmt_helper
::
append_string_view
(
msg
.
source
.
filename
,
dest
);
dest
.
push_back
(
':'
);
fmt_helper
::
append_int
(
msg
.
source
.
line
,
dest
);
fmt_helper
::
append_string_view
(
closing_bracket
,
dest
);
dest
.
push_back
(
']'
);
dest
.
push_back
(
' '
);
}
// fmt_helper::append_string_view(msg.msg(), dest);
fmt_helper
::
append_string_view
(
msg
.
payload
,
dest
);
...
...
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