Questions tagged [bunyan]

Bunyan is a simple and fast JSON logging library for node.js services and a CLI tool for nicely viewing those logs.

115 questions
1
vote
0 answers

Bunyan logger on aws leaks file descriptors

I am using bunyan for logging on my node.js API which is hosted in aws. When I load test the API, it falls over after 4000 file descriptors. We found that the open file descriptors on the app increase with each request. The code to configure the…
AppsInOz
  • 61
  • 2
1
vote
1 answer

Bunyan logger.info error in Restful API

I'm working on a Restful API and I'm logging all the important steps with bunyan, including the requests. I'm having two problems with logging: My first problem is that when I log them, all my objects, instead of appearing like independent objects,…
Leo
  • 449
  • 2
  • 17
1
vote
2 answers

Custom logger and Socket.io 1.x

In pre 1.0 versions of Socket.io it seems you could set the logger with the logger option upon instantiation, but i cant seem to find any possibilities to do it after 1.0. Am i right they have removed this option, and are there any good ways i can…
hbentlov
  • 544
  • 2
  • 12
1
vote
0 answers

Logging the path where request was received in restify

I am using bunyan to log restify activity. My restify file looks something like this: var restify = require('restify') var bunyan = require('bunyan') log = bunyan.createLogger({ name: 'Restify_Activity_logs', level: 'info', stream:…
runtimeZero
  • 26,466
  • 27
  • 73
  • 126
1
vote
0 answers

how to pipe to bunyan logs

I'd like to create a simple logging sink that logs info to an s3 backing store using the kinesis node library https://github.com/mhart/kinesis How do I pipe the kinesis stream into a bunyan logger? It doesn't like the last line in this code var log…
MonkeyBonkey
  • 46,433
  • 78
  • 254
  • 460
0
votes
0 answers

Redirect Mocha outputs to Bunyan to be JSON formatted in VS Code terminal

{ "type": "node", "request": "launch", "name": "Mocha Current File with Bunyan", "program": "${workspaceFolder}/node_modules/mocha/bin/_mocha", "args": [ "--require", "bunyan", "--timeout", …
Teoman shipahi
  • 47,454
  • 15
  • 134
  • 158
0
votes
0 answers

Remove token field from bunyan log

I am using koa-bunyan-logger to log my request like this: 'use strict' const koaBunyanLogger = require('koa-bunyan-logger'); const Koa = require('koa'); const mount = require('koa-mount') const dbDriver = require('./database/interface') const {…
Siavoshkc
  • 346
  • 2
  • 16
0
votes
1 answer

Bunyan log messages marked without severity in GCP

I need your help. I'm using Bunyan to log messages in my Next app and everything was working as expected, but without any changes the messages started being registered with no severity. Now, in GCP we see the messages marked as default, no info no…
0
votes
1 answer

Is it possible to log frontend (React) errors to backend (Node JS) using Bunyan?

Recently I have been setting up logging for my web app. I am using NodeJS in the backend and using Bunyan to log any errors and etc there. I want to be able to also write any console logs and client errors from the frontend to the same file. Is this…
0
votes
2 answers

How to pipe log output inside of container in Kubernetes/OpenShift?

I have want to pipe the output of my nodejs file like node example.js|node_modules/bunyan/bin/bunyan for better readability. How can I specify this in the yaml? I tried several things like: command: - node args: -…
Calipee
  • 173
  • 1
  • 7
0
votes
0 answers

How do I pass a logger to a callback function in a promise called in a method?

I'm not terribly experienced in JavaScript or NodeJS, but I've written a Discord bot using discord.js that has a custom plugin framework and bunyan for logging. I pass a log object to this plugin before it is ever executed so I can keep the same…
robbmanes
  • 319
  • 3
  • 10
0
votes
0 answers

Monkey patch the node js bunyan logging

Do you have an idea on how to monkey patch the node js bunyan methods like info, debug by using shimmer(https://www.npmjs.com/package/shimmer) ? For example, this is my bunyan configuration: let bunyanLog = require('bunyan') let bunyanOpts = { …
Arman Ortega
  • 3,003
  • 1
  • 30
  • 28
0
votes
1 answer

UnhandledPromiseRejectionWarning: Error: Log entry with size 903.1K exceeds maximum size of 256.0K

I am having the following error (appeared twice only in last 12hours): (node:7) UnhandledPromiseRejectionWarning: Error: Log entry with size 903.1K exceeds maximum size of 256.0K I am using the @google-cloud/logging-bunyan": "^1.2.3" library on…
0
votes
1 answer

How to maintain info and error logs in different files using bunyan?

How to maintain different log files for info and error logs using bunyan? I am creating two different objects ( logger and err) using bunyan.createLogger. I referred this link : Separate info and error logs bunyan and followed the same steps , I…
0
votes
0 answers

How to avoid/solve node-gyp error during npm install on macos?

I am trying to install bunyan: $ npm init $ npm install bunyan > dtrace-provider@0.8.7 install /PATH2/test2/node_modules/dtrace-provider > node-gyp rebuild || node suppress-error.js make: Entering directory…
Walrus
  • 309
  • 1
  • 3
  • 16