com.heavenark.infrastructure.log.component.ArkLogPrinter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ark-log Show documentation
Show all versions of ark-log Show documentation
Heaven Ark Infrastructure Log Framework
The newest version!
package com.heavenark.infrastructure.log.component;
import com.heavenark.infrastructure.log.model.ArkLogType;
import static org.fusesource.jansi.Ansi.ansi;
/**
* Log printer, this class responsible for print log to console and based [ansi] dependency
*
* @author 冰糕Luminous BGLuminous Luminous
* @since 2.0.0
*/
public class ArkLogPrinter {
/** Private constructor */
private ArkLogPrinter() {}
/**
* Print log to console
*
* @param type log type
* @param formattedLog formatted log
*/
public static void print(ArkLogType type, String formattedLog) {
System.out.println(ansi().bg(type.getBCor()).fg(type.getFCor()).a(formattedLog).reset());
}
}