Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import {prettyTimestamped} from "./logger/format/pretty-timestamped";
import {pretty} from "./logger/format/pretty";
import {jsonFormat} from "./logger/format/json";
const cluster = require('cluster');
const Logger = require('bunyan');
const Error = require('http-errors');
const Stream = require('stream');
const pkgJSON = require('../../package.json');
const _ = require('lodash');
const dayjs = require('dayjs');
/**
* A RotatingFileStream that modifies the message first
*/
class VerdaccioRotatingFileStream extends Logger.RotatingFileStream {
// We depend on mv so that this is there
write(obj) {
super.write(jsonFormat(obj, false));
}
rotate(): void {
super.rotate();
this.emit('rotated');
}
}
let logger;
export interface LoggerTarget {
type?: string;
format?: string;