Bunyan is a simple and fast JSON logging library for node.js services and a CLI tool for nicely viewing those logs.
Questions tagged [bunyan]
115 questions
0
votes
1 answer
collect and format logs from stdout(php - monolog) in node js with exec
my PHP call from node.js is :
const process = exec('php ' + phpScriptPath, (err, phpResponse, stderr) => {
if (err){
this.logger.error('failed:' , err);
}
});
process.stdout.on('data',…

Tuz
- 1,810
- 5
- 29
- 58
0
votes
1 answer
Nodejs logging module - production env
I am currently working on NodeJS application project.
This application basically performs:
Interaction with Database (1000 request/response processing per min)
Server side processing logic using information obtained from database
Client request…

vmk
- 9
- 1
- 5
0
votes
2 answers
Path Problems when Creating bunyan Child Logger
In this simple app where two different files foo.js and bar.js imports Logger.js to create a bunyan child logger.
Problem: foo.js works flawlessly but bar.js has a problem finding MyService.log defined in Logger.js. This appears to be due to the…

Nyxynyx
- 61,411
- 155
- 482
- 830
0
votes
0 answers
restify auditLogger plugin
I am using restify auditLogger plugin with bunyun logger.
server.on('after', restify.plugins.auditLogger({
log: bunyan.createLogger({
name: 'audit',
stream: process.stdout
}),
event: 'after',
printLog: true
}));
but…

Circle
- 177
- 1
- 14
0
votes
1 answer
Add logger to an existing chat app
I'd like to log usernames/dates of people coming in and out a let's chat server instance. I was told bunyan and winston are good candidates but I have no clue on how to implement them on this specific project.
I'm not sure on which file I have to…

Mmeinert
- 35
- 5
0
votes
1 answer
On Azure, bunyan stops logging after a few seconds
I have a NodeJS web app and I've added logging via bunyan. Works perfectly on my desktop. On Azure it works perfectly for 1-10 seconds and then nothing else is ever logged. The app continues to run and operates correctly otherwise. I can't figure…

lordbah
- 313
- 1
- 2
- 12
0
votes
1 answer
Prevent Sequelize logger from including database credentials
I noticed in Sequelize version 4.4.2 that the log information includes database credentials when creating the model.
This is problematic if you wish to use the logs of query information in a production environment to audit queries or debug errors.…

Josh Ferrell
- 89
- 1
- 3
- 12
0
votes
0 answers
Catching an error for an async call
And then when adding a stream, I try to catch an occurring error:
try {
logger.addStream(stream); // ERROR HAPPENS AT THIS CALL
console.info(`TRY activated`);
} catch (e) {
console.error(e);
}
I do get the TRY activated message, but the app…

Milkncookiez
- 6,817
- 10
- 57
- 96
0
votes
1 answer
Resuse a variable in NodeJS
I am trying to use(log) the return object of a function without decalring multiple variables
How best can this be done following nodeJS/Javascript best practice.
Do I have to declare this variable multiple times as I know it by reference.
var…

JohnTheBeloved
- 2,323
- 3
- 19
- 24
0
votes
2 answers
if I try bunyan.createLogger my application doesn't start and doesn't show error
If I try to use winston module I have sucess. Nevertheless, if I try to use bunyan my application doesn't start neither show any error (or I don't know how to find the error).
I am debugging using Visual Studio Code although I don't think it is…

DemeCarvO
- 487
- 4
- 16
- 28
0
votes
1 answer
Bunyan stdout truncated
I have Bunyan logger writing to both a file and stdout. However, before the logger can finish writing everything to stdout, the node process exists and the logs to stdout are truncated.
Is there anyway to wait for the logs to finish printing before…

RNikoopour
- 523
- 4
- 16
0
votes
1 answer
Bunyan Logger typescript configuration Errror named logger cannot be named
I am trying to configure my Bunyan Logger for NodeJS project. This configuration was working fine, until I started to convert my project to Typescript.
Here is the configuration function for configuring my loggers in the file MyLogger.ts:
import {…

Panshul
- 1,064
- 2
- 14
- 33
0
votes
0 answers
How to implement logging in Polymer ? Bunyan in Polymer
Is it possible to import modules like bunyan or fs (node.js filesystem) to custom component.
I am trying to replicate Java's log4j usage in Polymer.
0
votes
2 answers
Logging in nodejs using bunyan logger, Print DEBUG, INFO, ERROR to same file
I have defined the logger.js as below:
var bunyan = require('bunyan');
var bunyanOpts = {
name: 'my-api',
streams: [
{
level: 'info',
path: 'logs/mylogs.log'
}
]
};
Using this I am only able to…

user1110790
- 787
- 2
- 8
- 27
0
votes
1 answer
Bunyan logger clean message before logging
I am using bunyan to log all sorts of informations, errors etc. There are a few times when the log message contains sensitive information that I don't want to log. Is there any way to filter the log message in the bunyan logger before actually…

Akshay Bhasin
- 581
- 2
- 6
- 13