changed to copying the file path upon message creation

This commit is contained in:
Andreas Schönle 2016-12-06 14:07:01 +01:00
parent cb3e2b1336
commit 793ddbd42e
2 changed files with 5 additions and 5 deletions

View File

@ -31,9 +31,9 @@ namespace g3 {
* desired way.
*/
struct LogMessage {
std::string file_path() const {
return _file_path;
}
std::string file_path() const {
return _file_path;
}
std::string file() const {
return _file;
}
@ -90,7 +90,7 @@ namespace g3 {
timespec _timestamp;
std::thread::id _call_thread_id;
std::string _file;
const char * _file_path;
std::string _file_path;
int _line;
std::string _function;
LEVELS _level;

View File

@ -160,7 +160,7 @@ namespace g3 {
: _timestamp(other._timestamp)
, _call_thread_id(other._call_thread_id)
, _file(std::move(other._file))
, _file_path(other._file_path)
, _file_path(std::move(other._file_path))
, _line(other._line)
, _function(std::move(other._function))
, _level(other._level)