make the extravagant demo more extravagant

This commit is contained in:
Johann Dreo 2023-01-31 00:07:11 +01:00
commit 25b8adcae5
3 changed files with 10 additions and 10 deletions

View file

@ -1363,7 +1363,7 @@ class clutchlog
#if CLUTCHLOG_HAVE_UNIX_SYSIOCTL
// hfill is replaced last to allow for correct line width estimation.
const std::string raw_row = replace(row, "\\x1B\\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]", "");
const std::string raw_row = replace(row, "(\\x9B|\\x1B\\[)[0-?]*[ -\\/]*[@-~]", "");
const std::string hfill_tag = "{hfill}";
const size_t hfill_pos = row.find(hfill_tag);
const size_t raw_hfill_pos = raw_row.find(hfill_tag);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 KiB

After

Width:  |  Height:  |  Size: 175 KiB

Before After
Before After

View file

@ -78,8 +78,6 @@ int main(const int argc, char* argv[])
fmt bold(fmt::typo::bold);
log.depth_mark("| ");
log.hfill_min(400);
log.hfill_max(500);
log.hfill_mark('-');
const short dark = 238;
@ -95,17 +93,18 @@ int main(const int argc, char* argv[])
<< fmt(dark,lite) << "{name}"
<< fmt(fg::none,lite,typo::inverse) << "{level_fmt}"
<< fmt(fg::none,bg::black,typo::inverse) << "{level_fmt}" << " {level_short} " << reset
<< "{level_fmt} " << reset
<< fmt(dark,bg::none) << "{depth_marks}" //<< reset
<< "{level_fmt}"
<< "{level_fmt} " << reset
<< fmt(dark,bg::none, typo::bold) << "{depth_marks}" << reset
// << "{funchash_fmt}"
<< "{level_fmt}"
<< bold("{msg}")
// << discreet(" {hfill} ")
<< "{depth_fmt} {hfill} "
<< fmt(dark,bg::none) << ""
<< fmt(fg::none,dark) << "{funchash_fmt}{func} "
<< fmt(dark,bg::none) << " ·" << ""
<< fmt(fg::none,dark) << "{funchash_fmt}-{hfill}"
<< fmt(fg::none,dark) << " {funchash_fmt}{func} "
<< fmt(lite,dark) << ""
<< fmt(dark,lite) << "{filehash_fmt}{file}" << reset
// << fmt(dark,lite) << "{filehash_fmt}{file}" << reset
<< fmt(dark,lite) << "{file}" << reset
<< fmt(dark,lite) << ""
<< fmt(lite,dark) << "{line}" << reset
<< "\n";
@ -113,6 +112,7 @@ int main(const int argc, char* argv[])
log.out(std::clog);
log.strip_calls(4);
log.filename(clutchlog::filename::dirstem);
if(argc <= 2) {
CLUTCHLOG(warning, "Log level not indicated, will default to xdebug");