I need your help. I'm using Bunyan to log messages in my Next app and everything was working as expected, but without any changes the messages started being registered with no severity. Now, in GCP we see the messages marked as default, no info no error and checking the whole object I can see there's no severity property.
This is the configuration I have:
// Create a Bunyan logger that streams to Cloud Logging only errors
const bunyan = require('bunyan');
const loggerError = bunyan.createLogger(
{
name: 'my-app',
streams: [
{
level: 50,
stream: process.stderr,
}
],
},
);
// Create a Bunyan logger that streams to Cloud Logging only info
const loggerInfo = bunyan.createLogger(
{
name: 'my-app',
streams: [
{
level: 30,
stream: process.stdout,
}
],
},
);
And I use it as:
loggerError.error('This is an error');
But in GCP that message is stored as a Default message and not as an Error. Any idea?