Fix: info log return in Log module

This commit is contained in:
Filip Rojek 2024-05-02 02:08:08 +02:00
parent 1f121a8565
commit cbf56b54c1

View File

@ -3,11 +3,18 @@ import fs from 'fs'
import path from 'path'
export default class Log {
public static info(code: number, message: string, data?: any): void {
public static info(code: number, message: string, data?: any): object {
if (!data) {
data = ''
}
console.log(colors.bgGreen.black(` ${code} `) + colors.green.bgBlack(` ${message} `) + data)
//this.writeLog('info', code, message, data)
return {
code: code,
message: message,
data: data
}
}
public static error(code: number, message: string, data?: any): object {