You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using winston to log incoming request on a node v16express.js server using following code sample (boiled down to the essentials to reproduce the behaviour).
I am not sure what is causing this difference in behaviour and I could not find any documentation relevant to it.
Package:
"express": "^4.17.1",
"winston": "~3.3.3"
When logging with the logger.http("...") method, there is a strange undefined in the logs, but not when using logger.info("...") or any other log level function.
Where do those undefined come from?
(I am using winston already some time, and this has been something which has come very recently.)
What version of Logform presents the issue?
v2.4.0
What version of Node are you using?
v16.15.0
If this worked in a previous version of Logform, which was it?
info: ⟵ Starting http logging
http:undefined⟵ Starting http logging
info: ⚡ 'server' launched
error: ⟵ GET '/'
warn: ⟵ GET '/'
info: ⟵ GET '/'
verbose: ⟵ GET '/'
http:undefined⟵ GET '/'
http:undefined⟵ GET '/'
debug: ⟵ GET '/'
silly: ⟵ GET '/'
error: ⟵ GET '/'
warn: ⟵ GET '/'
info: ⟵ GET '/'
verbose: ⟵ GET '/'
http:undefined⟵ GET '/'
http:undefined⟵ GET '/'
debug: ⟵ GET '/'
silly: ⟵ GET '/'
error: ⟵ GET '/'
warn: ⟵ GET '/'
info: ⟵ GET '/'
verbose: ⟵ GET '/'
http:undefined⟵ GET '/'
http:undefined⟵ GET '/'
debug: ⟵ GET '/'
silly: ⟵ GET '/'
The problem
I am using winston to log incoming request on a
node v16
express.js
server using following code sample (boiled down to the essentials to reproduce the behaviour).I am not sure what is causing this difference in behaviour and I could not find any documentation relevant to it.
Package:
When logging with the
logger.http("...")
method, there is a strangeundefined
in the logs, but not when usinglogger.info("...")
or any other log level function.Where do those
undefined
come from?(I am using winston already some time, and this has been something which has come very recently.)
What version of Logform presents the issue?
v2.4.0
What version of Node are you using?
v16.15.0
If this worked in a previous version of Logform, which was it?
2.2.0
Minimum Working Example
Server script:
Additional information
Logs when starting up the server and calling
/
:I have been redirected here from an answer on SO: https://stackoverflow.com/questions/72783394/winston-http-log-level-behaves-different-than-info
🔎 Search Terms
http info undefined log level
The text was updated successfully, but these errors were encountered: