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
0
votes
0 answers

facing some unknown errors with autoclose using log4js

so iam trying to add an multiple logs file logging system but iam facing some errors which couldn't be read becuase of console auto close... log4js.configure({ appenders: { logs: { type: ['file','console'], filename:…
Zorono
  • 75
  • 2
  • 12
0
votes
1 answer

Java script is not writing the logs into file but showing the logs on console

I am trying to create a logfile where I want to write everything info/error/warn etc. Below is my code where I can see the logs on console but the script is not writing into a file: var log4js = require('log4js'); log4js.configure({ appenders:…
0
votes
1 answer

Log4js Config Error

I'm currently trying to setup a csgo gambling site for fun and I'm getting this error when trying to run bot.js Error: Problem with log4js configuration: ({ appenders: [ { type: 'console' }, { type: 'file', filename: 'logs/bot_undefined.log' } ] })…
flo31s
  • 1
0
votes
0 answers

How to pass req.user.id from my route.js to mongoose 'pre' middleware?

I'm using nodejs with mongodb and need to log users actions (who does what ). To do so, I'm using pre middleware and log4js to write in file, it's something like this : var userSchema = new Schema(..); userSchema.pre('save', function(next) { …
user3711521
  • 285
  • 5
  • 14
0
votes
1 answer

log4js - New Configuration Format Confusing

I have following old log4js code which i need to convert into the new log4js format, but i am confused how to do this, can someone please help log4js.configure({ appenders:[ { "type": "console", "category":…
mahen3d
  • 7,047
  • 13
  • 51
  • 103
0
votes
1 answer

How to set log4j2.xml Configuration status

Can someone help me to set Configuration status from properties file. Here i have tried as below in log4j2.xml and its writing in server log as ERROR Invalid status level specified Configuration…
Ranjit
  • 146
  • 1
  • 9
0
votes
1 answer

log4js configuration error, when trying to run node site.js

I keep getting this error every time I try running node site.js Error: Problem with log4js configuration: ({ appenders: Anyone have any ideas or know the fix, I am trying to run site.js to start up my site.
Iconic
  • 1
  • 1
0
votes
0 answers

I am using log4js for logging the information. Want to print system logs. So how to do it?

I want to print the systems logs as its get printed using java and log4j. However, i am not getting the way to write the system logs in protractor using log4js. log4js.configure({ appenders: [ { type: "clustered", appenders: [ …
anuvrat singh
  • 411
  • 1
  • 7
  • 20
0
votes
1 answer

How can convert log file time in this format "23-May-17 12:05:37" in log4js package using node js

I am trying to change log time this date time format [2017-05-23 12:05:37.327] into this 23-May-17 12:05:37. I am using this package: https://www.npmjs.com/package/log4js Here is file configuration of node4js. { "appenders": [ { …
Raheel Aslam
  • 444
  • 1
  • 9
  • 28
0
votes
1 answer

log4js is not working on gae with nodejs

I am trying to deploy node project on google app engine using gcloud app deploy But this is throwing error Updating service [default]...failed. ERROR: (gcloud.app.deploy) Error Response: [9] Application startup error: module.js:471 throw err; …
Sunil Garg
  • 14,608
  • 25
  • 132
  • 189
0
votes
1 answer

Compressed backups with daterolling file appender in log4js with node

I am new to nodejs and I am trying to compress the backup log files with DateRolling File appended using log4js with nodejs. "appenders": [ { "type": "dateFile", …
0
votes
1 answer

Aggregate logs and write to files later without directly writing to files

Currently I have implemented and express.js application and I have added log4js logger for logging purposes. Now I wanted to write logs into Redis and then background worker which continuously pulls logs from the Redis List and write those logs into…
Chamika Kasun
  • 96
  • 3
  • 16
0
votes
1 answer

node log4js maxlogsize do not work

I try to get rewrited log file less than 20mb. I have configured my log4js file appender with maxlogsize parameter as 20mb, but it doesn't work. Logger write log files greater then 20mb. So may be someone know how to fix this issue? "use…
Ihar Sadounikau
  • 741
  • 6
  • 20
0
votes
2 answers

How to log into file using log4js when I get a error response?

I want to log into some file when I only get a error response from client. And I want to print messages on terminal when I get the others. So, I'm using express and log4js like that. Here is some part of my code. const log4js = require('log4js'), …
hshan
  • 655
  • 2
  • 6
  • 19
0
votes
1 answer

log4js-node mask sensitive details while logging

Could anyone help on masking sensitive fields using log4js in node? Found similar filters in winston logger but if something similar is available in log4js, it would be helpful.
dejavu
  • 3,236
  • 7
  • 35
  • 60
1 2 3
8 9