|
import * as config from "./config";
|
|
|
|
export enum LogLevel {
|
|
SILENT,
|
|
ERROR,
|
|
WARNING,
|
|
INFO,
|
|
DEBUG
|
|
}
|
|
|
|
export async function log(logLevel: LogLevel, logMessage: any) {
|
|
if (config.logLevel >= logLevel)
|
|
console.log(LogLevel[logLevel].padStart(7) + ' | ' + logMessage)
|
|
}
|