mirror of
https://github.com/filiprojek/nork.git
synced 2024-11-23 01:01:04 +01:00
Fix: info log return in Log module
This commit is contained in:
parent
1f121a8565
commit
cbf56b54c1
@ -3,11 +3,18 @@ import fs from 'fs'
|
|||||||
import path from 'path'
|
import path from 'path'
|
||||||
|
|
||||||
export default class Log {
|
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) {
|
if (!data) {
|
||||||
data = ''
|
data = ''
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(colors.bgGreen.black(` ${code} `) + colors.green.bgBlack(` ${message} `) + 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 {
|
public static error(code: number, message: string, data?: any): object {
|
||||||
|
Loading…
Reference in New Issue
Block a user