mirror of
https://git.stamm.me/OpenServer/NodeLogging.git
synced 2024-12-22 19:59:23 +00:00
Adding option to disable default Logging
This commit is contained in:
parent
3f035ad1b9
commit
abba0119c9
2
out/index.d.ts
vendored
2
out/index.d.ts
vendored
@ -69,7 +69,7 @@ export declare class LoggingBase {
|
||||
private writeToErrorFile(data);
|
||||
private initializeFile(file, new_file?);
|
||||
}
|
||||
export declare const Logging: LoggingBase;
|
||||
export declare let Logging: any;
|
||||
export default Logging;
|
||||
export declare enum LoggingTypes {
|
||||
Log = 0,
|
||||
|
@ -250,7 +250,10 @@ class LoggingBase {
|
||||
}
|
||||
}
|
||||
exports.LoggingBase = LoggingBase;
|
||||
exports.Logging = new LoggingBase();
|
||||
exports.Logging = undefined;
|
||||
if (process.env.LOGGING_NO_DEFAULT !== "true") {
|
||||
exports.Logging = new LoggingBase();
|
||||
}
|
||||
exports.default = exports.Logging;
|
||||
function fsUnlink(path) {
|
||||
return new Promise((resolve, reject) => {
|
||||
|
File diff suppressed because one or more lines are too long
@ -283,7 +283,11 @@ export class LoggingBase {
|
||||
return { size: 0, stream: undefined };
|
||||
}
|
||||
}
|
||||
export const Logging = new LoggingBase();
|
||||
|
||||
export let Logging = undefined;
|
||||
if (process.env.LOGGING_NO_DEFAULT !== "true") {
|
||||
Logging = new LoggingBase();
|
||||
}
|
||||
export default Logging;
|
||||
|
||||
function fsUnlink(path) {
|
||||
|
Loading…
Reference in New Issue
Block a user