Skip to content

set custom logger? #1444

@soryy708

Description

@soryy708

Given a service that uses @sendgrid/mail and a few other things, I'd like its logger output to be consistent, to make it easier to consume, aggregate, and send to a logs stream for indexing.
(For example, I may want each log entry to be a single line in JSON format (making stdout act like JSONL))

However, in some warning/error cases this SDK writes directly to console, so I can't change the output format?

This leads to "Unparsed logs" showing up in Datadog, looking like for example:

Content with characters ', " or & may need to be escaped with three brackets
{{{ content }}}
See https://sendgrid.com/docs/for-developers/sending-email/using-handlebars/ for more information.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions