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

How can I make a log file including login/logout user information with nodejs?

experts, I'm trying to make a log file which shows usual log plus user login/logout information with timestamp. Middleware like Winston or log4js shows some information but login history (username, login time, and logout time) is not shown. Is there…
econuri
  • 21
  • 2
0
votes
0 answers

How to resolve the issue > Cannot read properties of undefined (reading 'native') with log4js implementation in cypress?

JSON data in json file: { "appenders": { "out": {"type": "console", "layout": { "type": "coloured" } }, "app": {"type": "dateFile", "filename": "cypress-logs/logger/info.log", "maxLogSize": 10485760, "layout": {"type":"pattern",…
0
votes
1 answer

log4js remove appender prefix

I have a log4js configuration like the following (from the docs): log4js.configure({ appenders: { everything: { type: "file", filename: "all-the-logs.log" }, }, categories: { default: { appenders: ["everything"], level: "debug" }, …
Evan
  • 1,892
  • 2
  • 19
  • 40
0
votes
1 answer

Log4js not write into the file from the catch block

I want to log errors on try catch construct using log4js. I have next code: let log4js = require('log4js') log4js.configure({ appenders: { asterisk: {type: 'file', filename: 'filename'}, out: {type: 'stdout'}, }, categories: {default:…
Dmitriy G
  • 171
  • 1
  • 1
  • 4
0
votes
0 answers

Writing to textbox inside iFrame on Wix website

I have a Wix website and I'm simply trying to write to a textbox inside an iFrame. It seems like a straightforward thing, but I can't find and code examples. Can someone help me? Thanks!
0
votes
1 answer

log4js appenders with webpack

Log4js uses dynamic require for loading appenders. Webpack doesn't know at build time which appender will be used at runtime. How can I use not build in appenders? like @log4js-node/logstashudp
0
votes
0 answers

log4js and vulnerability CVE-2021-44228

Because of the vulnerability found in the Log4j logging framework, I want to know if I use log4js version 4.2.0 on my Angular application, should I be concerned?
Kohan95
  • 10,019
  • 5
  • 20
  • 21
0
votes
1 answer

How would you manually trigger errors to be logged from node express to sentry?

I am currently using a logger with node express called log4js. Whenever I get an error I log it to a file. Log files are hard to read and understand and the logger is kind of useless since I am not looking at the logged errors. I just set up…
AugustusCaesar
  • 175
  • 2
  • 14
0
votes
1 answer

pm2 logs are disappearing after 5 days

Even though I specify "numBackups" as "90" I'm only seeing 5 log files, older ones are being removed. This is how I start the server pm2 start server.js --name app_server --log log/app.log --time This is my full log4js.json { "appenders": { …
user1291453
  • 133
  • 3
  • 12
0
votes
2 answers

How to write dynamic log file names with log4js-node?

I am trying to write a log file based on the time-stamp of the code when it runs. The log writes very well when the name is set, for example "Test.log": const appSettings = { log4js: { traceLogConfig: { appenders:…
Nimrod Yanai
  • 777
  • 2
  • 8
  • 30
0
votes
0 answers

Failed SSL connection: error:1408F10B:SSL routines:ssl3_get_record:wrong version number

So I'm trying to accomplish the following: Using log4js-node I am trying to transmit my logging data to another server, which captures the data. Now without encryption it's all nice and dandy, but I want dem fancy encryptions for security purposes…
Munchkin
  • 857
  • 5
  • 24
  • 51
0
votes
1 answer

AWS Cloud Watch Logs formatting

I have an issue with the logs on Cloud Watch. I keep having the logs on different entries instead of one single entry per log. Here's an example. Output in the console: [2020-12-21T11:51:21.966] [ERROR] default - [handlerProcess] [ ValidationError…
0
votes
1 answer

How to get the current real-time log data from log4js?

I have a requirement now, when log4js is printing logs, I need to get the current real-time log data, a complete piece of log information (log4js processed).Does log4js has such an interface? logger.error("Cheese is too ripe!"); When the code is…
神应歌
  • 1
  • 1
0
votes
1 answer

How to trace request id in Loopback 4?

I am trying to trace each HTTP request in my REST API using Loopback 4 in order to log them in the controllers using log4js, just like this: [2020-05-05T19:21:52.191] [INFO] [request-id:47e9a486-1243-1c07-3ac0-0acc9cce2c0e] user.controller.ts -…
0
votes
0 answers

Create a LogDNA appender for log4js in Typescript

I want to create a LogDNA appender for my log4js logger, so below is my code. The issue I have is with the configure function. Actually I don't know what is the type of layouts, I know it's a function but couldn't find its type in log4js typescript…
devio
  • 1,147
  • 5
  • 15
  • 41
1 2 3
8 9