Skip to content

Commit

Permalink
Ensure that logging prints filename only and not a full path.
Browse files Browse the repository at this point in the history
  • Loading branch information
linuxdude42 committed May 4, 2022
1 parent 0813d58 commit f996e9c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mythtv/libs/libmythbase/logging.cpp
Expand Up @@ -128,8 +128,10 @@ LoggingItem::LoggingItem(const char *_file, const char *_function,
ReferenceCounter("LoggingItem", false),
m_threadId((uint64_t)(QThread::currentThreadId())),
m_line(_line), m_type(_type), m_level(_level),
m_file(_file), m_function(_function)
m_function(_function)
{
const char *slash = std::strrchr(_file, '/');
m_file = (slash != nullptr) ? slash+1 : _file;
m_epoch = nowAsDuration<std::chrono::microseconds>();
setThreadTid();
}
Expand Down

0 comments on commit f996e9c

Please sign in to comment.