feat(filename): adds filename shortening methods
This commit is contained in:
parent
026cfa7618
commit
28205c42d5
3 changed files with 103 additions and 6 deletions
31
tests/t-filename.cpp
Normal file
31
tests/t-filename.cpp
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
#include <iostream>
|
||||
#include <limits>
|
||||
|
||||
#include "../clutchlog/clutchlog.h"
|
||||
|
||||
int main(/*const int argc, char* argv[]*/)
|
||||
{
|
||||
auto& log = clutchlog::logger();
|
||||
log.format("{msg}\t= {filehash_fmt}{file}\n");
|
||||
log.threshold(clutchlog::level::xdebug);
|
||||
|
||||
log.filename(clutchlog::filename::path);
|
||||
CLUTCHLOG(note,"clutchlog::filename::path");
|
||||
|
||||
log.filename(clutchlog::filename::base);
|
||||
CLUTCHLOG(note,"clutchlog::filename::base");
|
||||
|
||||
log.filename(clutchlog::filename::dir);
|
||||
CLUTCHLOG(note,"clutchlog::filename::dir");
|
||||
|
||||
log.filename(clutchlog::filename::dirbase);
|
||||
CLUTCHLOG(note,"clutchlog::filename::dirbase");
|
||||
|
||||
log.filename(clutchlog::filename::stem);
|
||||
CLUTCHLOG(note,"clutchlog::filename::stem");
|
||||
|
||||
log.filename(clutchlog::filename::dirstem);
|
||||
CLUTCHLOG(note,"clutchlog::filename::dirstem");
|
||||
}
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue