diff --git a/clutchlog/clutchlog.h b/clutchlog/clutchlog.h index c619f99..95cbf94 100644 --- a/clutchlog/clutchlog.h +++ b/clutchlog/clutchlog.h @@ -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); diff --git a/demo-extra.png b/demo-extra.png index fdede39..d33a152 100644 Binary files a/demo-extra.png and b/demo-extra.png differ diff --git a/tests/t-demo-extravagant.cpp b/tests/t-extra.cpp similarity index 87% rename from tests/t-demo-extravagant.cpp rename to tests/t-extra.cpp index a7ed491..cf10d55 100644 --- a/tests/t-demo-extravagant.cpp +++ b/tests/t-extra.cpp @@ -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");