Skip to content

Why does prefix always ends with dot '.' ? #3

@hepiyellow

Description

@hepiyellow

Hi,

I find it annoying that if my context prefix is foo.boo,
and I make a log call like this:
logCtx.debug('Got user from db');
Then the log message would be:
foo.boo.Got user from db

It looks like the 'Got' is part of the prefix.
So I guess the intended use is that every log would include a first name argument.
like logCtx.debug('something', 'Got user from db');
And then the log would look like:
foo.boo.something Got user from db

But what if I don't have any something to say. So it forces me to pass an empty string as the first argument of every log.

Am I missing something here?
Or you think it is a good idea to make this trailing dot optional?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions