mirror of
https://github.com/whyour/qinglong.git
synced 2026-09-15 19:57:07 +08:00
19 lines
490 B
TypeScript
19 lines
490 B
TypeScript
import { resolveFileAccess } from '../shared/fileAccess';
|
|
import path from 'path';
|
|
import { Inject, Service } from 'typedi';
|
|
import winston from 'winston';
|
|
import config from '../config';
|
|
|
|
@Service()
|
|
export default class LogService {
|
|
constructor(@Inject('logger') private logger: winston.Logger) {}
|
|
|
|
public checkFilePath(filePath: string, fileName: string) {
|
|
return resolveFileAccess(
|
|
config.logPath,
|
|
[filePath || '', fileName],
|
|
config.blackFileList,
|
|
);
|
|
}
|
|
}
|