github.com/coyove/common@v0.0.0-20240403014525-f70e643f9de8/logg/readme.md (about)

     1  # logg
     2  
     3  Basic usage: 
     4  `var logger = logg.NewLogger(<FORMAT>)`
     5  
     6  Where `<FORMAT>` is a string whose content, for example, can be:
     7  
     8  1. `dbg0`: output `DEBUG0`, `DEBUG`, `LOG`, `INFO`, `WARNING`, `ERROR`, `FATAL`;
     9  2. `log`: output `LOG`, `INFO`, `WARNING`, `ERROR`, `FATAL`;
    10  2. `warn`: output `WARNING`, `ERROR`, `FATAL`;
    11  2. `fatal`: output `FATAL` only;
    12  2. `off`: disable the output;
    13  2. `log^info^warn`: output `LOG`, `ERROR`, `FATAL` with `INFO` and `WARN` being ignored;
    14  2. `log:pathtofile.csv`: output to a file;
    15  2. `log:512000+pathtofile.csv`: output to a file, split every 512000 bytes;