mirror of
https://github.com/matrix-construct/construct
synced 2024-06-28 14:58:20 +02:00
ircd::log: Tweak log format.
This commit is contained in:
parent
339e43c004
commit
ad7c6980ac
|
@ -516,30 +516,31 @@ noexcept
|
||||||
// Compose the prefix sequence into the buffer through stringstream
|
// Compose the prefix sequence into the buffer through stringstream
|
||||||
std::stringstream s;
|
std::stringstream s;
|
||||||
pubsetbuf(s, buf);
|
pubsetbuf(s, buf);
|
||||||
s << microtime(date)
|
s
|
||||||
<< ' '
|
<< microtime(date)
|
||||||
<< string_view{conf.console_ansi}
|
<< ' '
|
||||||
<< std::setw(8)
|
<< std::setw(5)
|
||||||
<< std::right
|
<< std::right
|
||||||
<< reflect(lev)
|
<< ctx::epoch()
|
||||||
<< (string_view{conf.console_ansi}? "\033[0m " : " ")
|
<< ' '
|
||||||
// << (log.snote? log.snote : '-')
|
<< string_view{conf.console_ansi}
|
||||||
<< std::setw(LOG_NAME_TRUNC)
|
<< std::setw(8)
|
||||||
<< std::left
|
<< std::right
|
||||||
<< trunc(log.name, LOG_NAME_TRUNC)
|
<< reflect(lev)
|
||||||
<< ' '
|
<< (string_view{conf.console_ansi}? "\033[0m " : " ")
|
||||||
<< std::setw(5)
|
// << (log.snote? log.snote : '-')
|
||||||
<< std::right
|
<< std::setw(LOG_NAME_TRUNC)
|
||||||
<< ctx::id()
|
<< std::left
|
||||||
<< ' '
|
<< trunc(log.name, LOG_NAME_TRUNC)
|
||||||
<< std::setw(CTX_NAME_TRUNC)
|
<< ' '
|
||||||
<< std::left
|
<< std::setw(5)
|
||||||
<< trunc(ctx::name(), CTX_NAME_TRUNC)
|
<< std::right
|
||||||
<< ' '
|
<< ctx::id()
|
||||||
<< std::setw(5)
|
<< ' '
|
||||||
<< std::right
|
<< std::setw(CTX_NAME_TRUNC)
|
||||||
<< ctx::epoch()
|
<< std::left
|
||||||
<< " :";
|
<< trunc(ctx::name(), CTX_NAME_TRUNC)
|
||||||
|
<< " :";
|
||||||
|
|
||||||
// Compose the user message after prefix
|
// Compose the user message after prefix
|
||||||
const size_t pos(s.tellp());
|
const size_t pos(s.tellp());
|
||||||
|
|
Loading…
Reference in a new issue