nodejs-logging-winston icon indicating copy to clipboard operation
nodejs-logging-winston copied to clipboard

Missing HTTP log level

Open VictorLNoCapInc opened this issue 3 years ago • 1 comments

Is your feature request related to a problem? Please describe. I am using http log level (default log level from winston) to display result of API calls. But it makes @google-cloud/loggin-winston crash because http log level is unknown for the package. Here is the error: Error: Unknown log level: http at LoggingCommon.log (/app/node_modules/@google-cloud/logging-winston/build/src/common.js:107:19) at LoggingWinston.log

Describe the solution you'd like Just add http log level support or at least don't throw an error.

VictorLNoCapInc avatar Apr 13 '22 22:04 VictorLNoCapInc

Looking at winston documentation about log levels i do not find "http" level. The existing code indeed throws an error: https://github.com/googleapis/nodejs-logging-winston/blob/a76167f123552007e8dba4005ae77ec384eb3494/src/common.ts#L170-L172

The exception is thrown if the provided log level is not one of the names in the winston Logging Levels. To have the problem more visual for us, can you please provide a simple application source code that demonstrates the problem?

minherz avatar Apr 14 '22 03:04 minherz

I think that this one is related to the same issue: 757

losalex avatar Nov 30 '22 04:11 losalex

Closing as duplicate of 757

losalex avatar Dec 22 '22 20:12 losalex