2023-03-03 15:23:46 +00:00
|
|
|
import { inject, injectable } from "tsyringe";
|
2023-10-19 17:21:17 +00:00
|
|
|
|
|
|
|
import { IAsyncQueue } from "@spt-aki/models/spt/utils/IAsyncQueue";
|
|
|
|
import { IUUidGenerator } from "@spt-aki/models/spt/utils/IUuidGenerator";
|
|
|
|
import { AbstractWinstonLogger } from "@spt-aki/utils/logging/AbstractWinstonLogger";
|
2023-03-03 15:23:46 +00:00
|
|
|
|
|
|
|
@injectable()
|
|
|
|
export class WinstonMainLogger extends AbstractWinstonLogger
|
|
|
|
{
|
|
|
|
|
|
|
|
constructor(
|
|
|
|
@inject("AsyncQueue") protected asyncQueue: IAsyncQueue,
|
|
|
|
@inject("UUidGenerator") protected uuidGenerator: IUUidGenerator
|
|
|
|
)
|
|
|
|
{
|
|
|
|
super(asyncQueue, uuidGenerator);
|
|
|
|
}
|
|
|
|
|
|
|
|
protected isLogExceptions(): boolean
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
protected isLogToFile(): boolean
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
protected isLogToConsole(): boolean
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
protected getFilePath(): string
|
|
|
|
{
|
|
|
|
return "./user/logs/";
|
|
|
|
}
|
|
|
|
|
|
|
|
protected getFileName(): string
|
|
|
|
{
|
|
|
|
return "server-%DATE%.log";
|
|
|
|
}
|
|
|
|
}
|