// TODO - fix!  this case fails: ^cyan^warn^r^ if ^warn^ is evaluated first...really meant for ^cyan^ and ^r^
// TODO - to be resolved
static String resolve(String message, Object[] args) {
        String formatted = String.format(message, args);
        // TODO - fix!  this case fails: ^cyan^warn^r^ if ^warn^ is evaluated first...really meant for ^cyan^ and ^r^
        // TODO - to be resolved
        for (String key : TERM_CODES.keySet()) {
            TermCode termCode = TERM_CODES.get(key);
            Matcher matcher = termCode.pattern.matcher(formatted);
            if (matcher.find()) {
                if (("warn".equals(key) && !warnLevel.get()) || ("info".equals(key) && !infoLevel.get())
                        || ("dbug".equals(key) && !dbugLevel.get())) {
                    // this is a log statement for a disabled log-level, skip.
                    return null;
                }
                if (decorated.get()) {
                    String output = isColoredOutput() ? termCode.output : termCode.nonColoredOutput;
                    formatted = matcher.replaceAll(output);
                }
            }
        }
        return formatted;
    }
static String resolve(String message, Object[] args) {
String formatted = String.format(message, args);
// TODO - fix! this case fails: ^cyan^warn^r^ if ^warn^ is evaluated first...really meant for ^cyan^ and ^r^
// TODO - to be resolved
for (String key : TERM_CODES.keySet()) {
TermCode termCode = TERM_CODES.get(key);
static String resolve(String message, Object[] args) {
String formatted = String.format(message, args);
// TODO - fix! this case fails: ^cyan^warn^r^ if ^warn^ is evaluated first...really meant for ^cyan^ and ^r^
// TODO - to be resolved
for (String key : TERM_CODES.keySet()) {
TermCode termCode = TERM_CODES.get(key);
Matcher matcher = termCode.pattern.matcher(formatted);
if (matcher.find()) {
if (("warn".equals(key) && !warnLevel.get()) || ("info".equals(key) && !infoLevel.get())
|| ("dbug".equals(key) && !dbugLevel.get())) {
// this is a log statement for a disabled log-level, skip.
return null;
}
if (decorated.get()) {
static String resolve(String message, Object[] args) {
String formatted = String.format(message, args);
// TODO - fix! this case fails: ^cyan^warn^r^ if ^warn^ is evaluated first...really meant for ^cyan^ and ^r^
// TODO - to be resolved
for (String key : TERM_CODES.keySet()) {
TermCode termCode = TERM_CODES.get(key);
Matcher matcher = termCode.pattern.matcher(formatted);
if (matcher.find()) {
if (("warn".equals(key) && !warnLevel.get()) || ("info".equals(key) && !infoLevel.get())
|| ("dbug".equals(key) && !dbugLevel.get())) {
// this is a log statement for a disabled log-level, skip.
return null;
}
if (decorated.get()) {
String output = isColoredOutput() ? termCode.output : termCode.nonColoredOutput;
formatted = matcher.replaceAll(output);
}
}
}
return formatted;
}