All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.heavenark.infrastructure.log.component.ArkLogPrinter Maven / Gradle / Ivy

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());
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy