mirror of
https://github.com/KjellKod/g3log.git
synced 2025-03-01 10:57:57 +01:00
Merge branch 'master' into windows-time-fix
This commit is contained in:
commit
2ebb9c2346
@ -31,6 +31,9 @@ namespace g3 {
|
||||
* desired way.
|
||||
*/
|
||||
struct LogMessage {
|
||||
std::string file_path() const {
|
||||
return _file_path;
|
||||
}
|
||||
std::string file() const {
|
||||
return _file;
|
||||
}
|
||||
@ -87,6 +90,7 @@ namespace g3 {
|
||||
timespec _timestamp;
|
||||
std::thread::id _call_thread_id;
|
||||
std::string _file;
|
||||
std::string _file_path;
|
||||
int _line;
|
||||
std::string _function;
|
||||
LEVELS _level;
|
||||
|
@ -42,7 +42,7 @@ namespace g3 {
|
||||
|
||||
template<typename DefaultLogCall >
|
||||
Sink(std::unique_ptr<T> sink, DefaultLogCall call)
|
||||
: SinkWrapper {},
|
||||
: SinkWrapper(),
|
||||
_real_sink {std::move(sink)},
|
||||
_bg(kjellkod::Active::createActive()),
|
||||
_default_log_call(std::bind(call, _real_sink.get(), std::placeholders::_1)) {
|
||||
@ -50,7 +50,7 @@ namespace g3 {
|
||||
|
||||
|
||||
Sink(std::unique_ptr<T> sink, void(T::*Call)(std::string) )
|
||||
: SinkWrapper {},
|
||||
: SinkWrapper(),
|
||||
_real_sink {std::move(sink)},
|
||||
_bg(kjellkod::Active::createActive()) {
|
||||
std::function<void(std::string)> adapter = std::bind(Call, _real_sink.get(), std::placeholders::_1);
|
||||
|
@ -127,6 +127,7 @@ namespace g3 {
|
||||
const std::string& function, const LEVELS& level)
|
||||
: _call_thread_id(std::this_thread::get_id())
|
||||
, _file(splitFileName(file))
|
||||
, _file_path(file)
|
||||
, _line(line)
|
||||
, _function(function)
|
||||
, _level(level)
|
||||
@ -147,6 +148,7 @@ namespace g3 {
|
||||
: _timestamp(other._timestamp)
|
||||
, _call_thread_id(other._call_thread_id)
|
||||
, _file(other._file)
|
||||
, _file_path(other._file_path)
|
||||
, _line(other._line)
|
||||
, _function(other._function)
|
||||
, _level(other._level)
|
||||
@ -158,6 +160,7 @@ namespace g3 {
|
||||
: _timestamp(other._timestamp)
|
||||
, _call_thread_id(other._call_thread_id)
|
||||
, _file(std::move(other._file))
|
||||
, _file_path(std::move(other._file_path))
|
||||
, _line(other._line)
|
||||
, _function(std::move(other._function))
|
||||
, _level(other._level)
|
||||
|
Loading…
x
Reference in New Issue
Block a user