loguru icon indicating copy to clipboard operation
loguru copied to clipboard

Make colors customizable

Open ImperiumAeternum opened this issue 2 years ago • 0 comments

We can print with colors to terminal

#define KCYN  "\x1B[36m"
    printf("%scyn\n", KCYN  );

Could it be added to the library as an optional parameter to verbosity levels?

#define KCYN  "\x1B[36m"
#define DETAILS 3
    LOG_F(3, KCYN, "log DETAILS with cyan color");
    LOG_F(3, "log DETAILS with default color");

It would make it easy to write a custom functions for colored output.

auto LOG_F3(string message) {
    LOG_F(DETAILS, KCYN, message);
}

The code is just demonstration of how idea may look.

ImperiumAeternum avatar Aug 04 '23 14:08 ImperiumAeternum