design pattern for wrapping logger in node.js application

I am writing a node.js application and using bunyan for logging. what i would like to do is to create one instance of the bunyan logger in the initialization of my app and from now on i want every...

Error: ENOENT with Bunyan rotating-file logging (NodeJS)

I am using the Bunyan module for NodeJS logging. When I try using the rotating-file type, it makes my app crash every time and outputs this error: Error: ENOENT, rename...

Formatting output in bunyan logging

I am experimenting on node bunyan module. As a part of it I would like to know some facts regarding bunyan.. Does bunyan facilitate a way to change the order of the contents printed on bunyan...

NodeJS Bunyan Logstash Log Indexing

I am using Bunyan and bunyas-lumberjack to send my logs to log stash and index them in elastic search. The problem I am facing is when I am filtering the logs: I am using a basic filter for...

docker-compose use pipe in command

I am having trouble running the following in docker-compose (1.7 build 0d7bf73 , compose file format version 1) which works fine from command line (docker 1.10.3): docker run --rm...

Error: spawn ENOENT on Windows

I'm on node v4.4.0 and on Windows 10. I'm using bunyan to log my node application. try { var fs = require('fs'); var path = require('path'); var spawn =...

EMFILE: too many open files, open BUNYAN or WINSTON

I use Bunyan then I try Winston and I got same result that it says EMFILE: too many open files, open So that I understand that I am doing something wrong. What I try to test is var winston =...

Is it possible to use level value instead of number in bunyan log messages?

Bunyan-node logs are printed (to stdout) with numeric log levels, as defined in the bunyan doc (https://github.com/trentm/node-bunyan#levels ) { ... , level: 10, .... } Is it possible to print...

How to remove range of git stash?

I want to remove all stash'es, except most recent, from git stash list. E.g. I want to remove stash 1 to 3 in a single git command: [email protected]{0}: On master: Test related changes [email protected]{1}: On master:...

SyntaxError: Unexpected token { when loading node module during jest test

I am running a jest test which depends on the "antd" node module It seems to be failing to properly parse the css file inside the atnd module. How can I solve this? When I run it it fails as...

Logging in Typescript using Bunyan and Logentries

I want to setup remote Logging using logentries.com in my ionic app. This an extract from my package.json: "dependencies": { "bunyan": "^1.8.5", "bunyan-logentries": "^1.2.0", }, ...

can I change the color of log data in winston?

I happened to use bunyan to log the the data . I wanted the logs be printed with appropriate colors like errors in red , debug yellow .. etc; unfortunately I couldn't find anyways to do that . And...

Log 'jsonPayload' in Firebase Cloud Functions

TL;DR; Does anyone know if it's possible to use console.log in a Firebase/Google Cloud Function to log entries to Stack Driver using the jsonPayload property so my logs are searchable (currently...

How to add custom JSON objects in Node.js Bunyan Logging?

I have few questions about Node.js Bunyan logging. I'm kinda new the bunyan logging, so please I apologize if i ask any laymen questions. I'm trying to stream bunyan log output in json format....

Sensitive data logging in bunyan

I am using bunyan for logging in nodeJs. I have sensitive info like password, cvv, pin. I want to exclude those params from logging. How to do it?

winston saves color formatter in text, how to remove this but still show color?

I am trying to create a logging module using winston as the logging framework. It allows me to specify colors, which is quite nice if the transport is Console, but if I were to define two...

How to make Node JS logs on App Engine standard as nice as Python

I just started running Nodejs on App Engine standard and everything is great except the standard log output is terrible. In Python (on app engine standard) you get really nice looking logs like...

Unexpected token keyword «function», expected punc «,»

Here is the error message after I try to run my app [15:32:01] Starting 'default'... [15:32:01] Plumber found unhandled error: GulpUglifyError: unable to minify JavaScript Caused by:...

Is it actually possible to make Detox/Jest tests pass with a React Native app running with Expo?

I'm attempting to create an automated UI test suite for my React Native app with Expo. I have looked everywhere for good tutorials but when I get to the actual test writing portion, my tests never...

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...

Plain console.warn() shows up in logs with serverity "ERROR"

When I log something with console.warn() it seems to appear in the Stackdriver logs with severity "ERROR". The Stackdriver Error Reporting does not show these errors, so it seems there they are...

How to remove hostname, pid and other default fields from Bunyan log output?

These are default fields { "name": "myapp", "hostname": "banana.local", "pid": 40161, "level": 30, "msg": "hi", "time": "2013-01-04T18:46:23.851Z", "v": 0 } How can I remove...

Open Source JSON log viewer for remote files

I am using bunyan to log a nodejs app on my ubuntu server. As a result, I get JSON logs. I tried to find a tool which I can run on my windows computer which connects like every 5 sec via FTP to my...

NestJS -- Accessing app context in controller

I have this code in main.ts: async function bootstrap() { const app = await NestFactory.create(AppModule, { logger: new LoggerService( process.env.SERVER_NAME || 'server', ...

error Your lockfile needs to be updated, but yarn was run with `--frozen-lockfile`

I have an issue regarding one dependency in my yarn.lock file. The issue is with ldapjs, the latest version has a bug regarding special characters in user or password so I want to freeze it in the...

Format PyCharm's consle output for json logs

I'm working on an app whose logs are formatted as JSON with a structure similar to {"level": "INFO", "lineno": 85, "timestamp": "2020-01-01", "message": "Some message"} This format works great in...

How to use DefinitelyTyped types on forked packages?

For packages that don't come with it's own types, next step is to look for @types/<package> for the package typings. However, if there is a package X, which is forked to a package Y. How can we...

NodeJs Iterate over req.files from swagger array having format type as binary

I am using swagger with Node and now stuck at multiple file upload part as i am able to get my files on server using swagger-fileupload-docs document page. middleware is multer and i use below...

How do I get startup-script logs from Container-optimized OS in a GCE instance?

I'm running a container-optimized compute instance with this startup-script: #!/bin/bash mkdir /home/my-app cd /home/my-app export HOME=/home/my-app docker-credential-gcr...

Bunyan logs not pretty-printing

I am working with windows using powershell as my terminal. I have an extremely simple nodejs app that uses bunyan. When run it produces the following output: C:\dev\proj\bunyanTest> node...