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
7aed4985
Commit
7aed4985
authored
Feb 25, 2018
by
Daniel Chabrowski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modernize-use-default-member-init
parent
d5a3bb52
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
15 deletions
+7
-15
include/spdlog/details/file_helper.h
include/spdlog/details/file_helper.h
+2
-4
include/spdlog/details/pattern_formatter_impl.h
include/spdlog/details/pattern_formatter_impl.h
+4
-5
include/spdlog/sinks/sink.h
include/spdlog/sinks/sink.h
+1
-6
No files found.
include/spdlog/details/file_helper.h
View file @
7aed4985
...
@@ -31,9 +31,7 @@ public:
...
@@ -31,9 +31,7 @@ public:
const
int
open_tries
=
5
;
const
int
open_tries
=
5
;
const
int
open_interval
=
10
;
const
int
open_interval
=
10
;
explicit
file_helper
()
:
explicit
file_helper
()
{}
_fd
(
nullptr
)
{}
file_helper
(
const
file_helper
&
)
=
delete
;
file_helper
(
const
file_helper
&
)
=
delete
;
file_helper
&
operator
=
(
const
file_helper
&
)
=
delete
;
file_helper
&
operator
=
(
const
file_helper
&
)
=
delete
;
...
@@ -138,7 +136,7 @@ public:
...
@@ -138,7 +136,7 @@ public:
return
std
::
make_tuple
(
fname
.
substr
(
0
,
ext_index
),
fname
.
substr
(
ext_index
));
return
std
::
make_tuple
(
fname
.
substr
(
0
,
ext_index
),
fname
.
substr
(
ext_index
));
}
}
private:
private:
FILE
*
_fd
;
FILE
*
_fd
{
nullptr
}
;
filename_t
_filename
;
filename_t
_filename
;
};
};
}
}
...
...
include/spdlog/details/pattern_formatter_impl.h
View file @
7aed4985
...
@@ -310,13 +310,12 @@ class T_formatter SPDLOG_FINAL:public flag_formatter
...
@@ -310,13 +310,12 @@ class T_formatter SPDLOG_FINAL:public flag_formatter
};
};
// ISO 8601 offset from UTC in timezone (+-HH:MM)
// ISO 8601 offset from UTC in timezone (+-HH:MM)
class
z_formatter
SPDLOG_FINAL
:
public
flag_formatter
class
z_formatter
SPDLOG_FINAL
:
public
flag_formatter
{
{
public:
public:
const
std
::
chrono
::
seconds
cache_refresh
=
std
::
chrono
::
seconds
(
5
);
const
std
::
chrono
::
seconds
cache_refresh
=
std
::
chrono
::
seconds
(
5
);
z_formatter
()
:
_last_update
(
std
::
chrono
::
seconds
(
0
)),
_offset_minutes
(
0
)
z_formatter
()
{}
{}
z_formatter
(
const
z_formatter
&
)
=
delete
;
z_formatter
(
const
z_formatter
&
)
=
delete
;
z_formatter
&
operator
=
(
const
z_formatter
&
)
=
delete
;
z_formatter
&
operator
=
(
const
z_formatter
&
)
=
delete
;
...
@@ -347,8 +346,8 @@ public:
...
@@ -347,8 +346,8 @@ public:
pad_n_join
(
msg
.
formatted
,
h
,
m
,
':'
);
pad_n_join
(
msg
.
formatted
,
h
,
m
,
':'
);
}
}
private:
private:
log_clock
::
time_point
_last_update
;
log_clock
::
time_point
_last_update
{
std
::
chrono
::
seconds
(
0
)
}
;
int
_offset_minutes
;
int
_offset_minutes
{
0
}
;
std
::
mutex
_mutex
;
std
::
mutex
_mutex
;
int
get_cached_offset
(
const
log_msg
&
msg
,
const
std
::
tm
&
tm_time
)
int
get_cached_offset
(
const
log_msg
&
msg
,
const
std
::
tm
&
tm_time
)
...
...
include/spdlog/sinks/sink.h
View file @
7aed4985
...
@@ -14,11 +14,6 @@ namespace sinks
...
@@ -14,11 +14,6 @@ namespace sinks
class
sink
class
sink
{
{
public:
public:
sink
()
{
_level
=
level
::
trace
;
}
virtual
~
sink
()
=
default
;
virtual
~
sink
()
=
default
;
virtual
void
log
(
const
details
::
log_msg
&
msg
)
=
0
;
virtual
void
log
(
const
details
::
log_msg
&
msg
)
=
0
;
virtual
void
flush
()
=
0
;
virtual
void
flush
()
=
0
;
...
@@ -28,7 +23,7 @@ public:
...
@@ -28,7 +23,7 @@ public:
level
::
level_enum
level
()
const
;
level
::
level_enum
level
()
const
;
private:
private:
level_t
_level
;
level_t
_level
{
level
::
trace
}
;
};
};
inline
bool
sink
::
should_log
(
level
::
level_enum
msg_level
)
const
inline
bool
sink
::
should_log
(
level
::
level_enum
msg_level
)
const
...
...
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