Questions tagged [log4js-node]

log4js-node is a logging framework for Node.js. (Not to be confused with log4js, since log4js-node is a different software.)

log4js-node is a conversion of the log4js framework to work with node.

121 questions
1
vote
1 answer

Not getting any logs for node process running through pm2 in cluster mode

If I am running pm2 process for node js app in fork mode , The logs are getting generated but same app is not giving logs if running in pm2 cluster mode I am using the below pm2 ecosystem file to start my app module.exports = { apps : [ { …
shadman140
  • 51
  • 7
1
vote
0 answers

Why log4js keeps splitting the log files?

I'm using log4js to log the test results to files. I have four test files and each file will create its own log file. So that should be 4 log files total, but I'm getting 6 log files total. Somehow it only logs the first two lines into the log…
Phil
  • 339
  • 2
  • 13
1
vote
1 answer

Is there support in log4js-node to log in AWS S3 using any appender?

Is there support in log4js-node to log in AWS S3 using any appenders?
1
vote
1 answer

Is there any way to output logs using log4js on Cloud Functions?

I'm using GCP's cloud function. What I want to achieve is to output logs by log4js. I know and have tried that using console.xxx() works well. Environment: - Google Cloud Functions - Functions-framework - nodejs10 as Runtime logger.js const…
Taruya
  • 81
  • 7
1
vote
1 answer

logger.debug is not a function while using log4js

I am using log4js for capturing the logs in node js. My node version is v10.16.3. When i run the code i am getting the error as logger.debug is not a function. Is there any node version compatibility? because I have used the same code before 1 year.…
Prathish
  • 61
  • 3
  • 10
1
vote
0 answers

Why are level ERROR not added to the errors file?

I use log4js and want to write error logs to a separate file. But all error levels are recorded for some reason only in the access file. And because of this, the errors file is empty. How to fix it? log4js.json: { "appenders": { "access":…
user12094588
  • 311
  • 1
  • 2
  • 6
1
vote
1 answer

Log4js - Disable logs for http calls

I'm using log4js to log messages. For some reason, the logger automatically logs the http calls, and I can't find a way to disable it. Here is my code: // Initialize the log4js logger by configurations parameters and appenders. …
Or Assayag
  • 5,662
  • 13
  • 57
  • 93
1
vote
1 answer

Pass configured log4js instance to class

I am using "log4js": "^4.3.1". I am having a main file that configures the class and the logger instance. const { StartLogger } = require('./StartLogger') const log4js = require('log4js'); log4js.configure('./config/log4js-config.json'); async…
Carol.Kar
  • 4,581
  • 36
  • 131
  • 264
1
vote
1 answer

Separate log levels

I am looking the way how can I post out only "INFO" level (for user) to console, and "DEBUG" level post to the file. Currently I found only one one work solution - using few "getLogger()" functions. For example: log4js.getLogger('debug');…
tavkiev
  • 53
  • 7
1
vote
1 answer

Log4js Pattern Layout Not Work

I configured this layout: log4js.configure({ appenders: { out : { type :'stdout', layout: { …
gdm
  • 7,647
  • 3
  • 41
  • 71
1
vote
1 answer

I'm having trouble running a js script in debian with node js

How I run the script: node site.js The error I get : throw new Error(Problem with log4js configuration: (${util.inspect(this.candida depth: 5 })}) + ^ Error: Problem with log4js configuration: ({ appenders: [ { type: 'console' }, …
user9407009
1
vote
1 answer

log4js npm error , log4js configuration

root@------:~# cd /home/bot root@------:/home/bot# node site.js /home/bot/node_modules/log4js/lib/configuration.js:43 throw new Error(Problem with log4js configuration: (${util.inspect(this.candidate, { depth: 5 })}) + ^ Error:…
d3m3ntos
  • 11
  • 1
  • 2
1
vote
1 answer

log4js - node package - not writing to file

I am novice to nodejs and wanted my node app to log to a file as well as console. Here is my code structure: fpa_log4j.json: { "appenders": { "fpa_file": { "type": "file", "filename": "fpa.log", "maxLogSize": 10485760, …
1
vote
3 answers

Error with log4js configuration: must have a property "appenders" of type object

I am getting Error: Problem with log4js configuration: ({ appenders: [ { type: 'logLevelFilter', level: 'INFO', appenders: { type: 'console' } } ] }) - must have a property "appenders" of type object. My protractor.conf.js file…
user1185821
  • 11
  • 1
  • 3
1
vote
0 answers

Set logger level for individual appenders with log4js-node

I am using log4js on Node.js Is there a way to configure log level of each logger & appender pair ? For example: I have the default console appender and a dateFile appender. I want dateFile appender to capture all messages according to globally…
TMG
  • 2,620
  • 1
  • 17
  • 40
1 2
3
8 9