mirror of
https://github.com/hoverkraft-tech/compose-action.git
synced 2026-01-15 00:53:07 +08:00
Some checks failed
Internal - Main - Continuous Integration / ci (push) Has been cancelled
Internal - Main - Continuous Integration / release (push) Has been cancelled
Need fix to Issue / main (push) Has been cancelled
Mark stale issues and pull requests / main (push) Has been cancelled
Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
32 lines
558 B
TypeScript
32 lines
558 B
TypeScript
import { debug, info, warning } from "@actions/core";
|
|
|
|
export class LoggerService {
|
|
warn(message: string): void {
|
|
warning(message);
|
|
}
|
|
|
|
info(message: string): void {
|
|
info(message);
|
|
}
|
|
|
|
debug(message: string) {
|
|
debug(message);
|
|
}
|
|
|
|
getServiceLogger(level: LogLevel): (message: string) => void {
|
|
switch (level) {
|
|
case LogLevel.Debug:
|
|
return this.debug;
|
|
case LogLevel.Info:
|
|
return this.info;
|
|
default:
|
|
return this.info;
|
|
}
|
|
}
|
|
}
|
|
|
|
export enum LogLevel {
|
|
Debug = "debug",
|
|
Info = "info",
|
|
}
|