-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unfortunately does not work for me. #18
Comments
There's a lot missing from this report. Can you provide a single |
Sure. const pino = require('pino');
const Arborsculpt = require('pino-arborsculpture');
const path = require('path');
const mainLogger = pino({level: 'debug'});
const arbor = new Arborsculpt({
path: path.join(__dirname, 'overrideLogLevel.json'),
loggers: [mainLogger],
interval: 5 * 1000,
});
setTimeout(() => {
mainLogger.error('ERROR');
mainLogger.debug('DEBUG');
},10*1000); package.json: {
"name": "abscur",
"version": "1.0.0",
"description": "",
"main": "index.js",
"dependencies": {
"path": "^0.12.7",
"pino": "^6.12.0",
"pino-arborsculpture": "^1.1.0"
},
"devDependencies": {},
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC"
}
overrideLogLevel.json: {
"level": "error"
} Output: {"level":50,"time":1626762831964,"pid":2879,"hostname":"SoSafe-NTB2-041.local","msg":"ERROR"}
{"level":20,"time":1626762831966,"pid":2879,"hostname":"SoSafe-NTB2-041.local","msg":"DEBUG"} |
Okay, this is weird, it works on my local windows maschine too, regardless of the path package. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
i try to get this to work but the loglevels seems to remain.
The following code is just a test and createLogger creates a child logger.
Tried with mainlogger also.
Content of overrideLogLevel.json:
Both logs appears but
The text was updated successfully, but these errors were encountered: