Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: format.align() is not working for log level verbose #2383

Open
Clockworkx opened this issue Jan 1, 2024 · 0 comments
Open

[Bug]: format.align() is not working for log level verbose #2383

Clockworkx opened this issue Jan 1, 2024 · 0 comments

Comments

@Clockworkx
Copy link

Clockworkx commented Jan 1, 2024

馃攷 Search Terms

align

The problem

No custom log levels used:
verbose fills the full \t that is given for aligning? See attached screen.
and for some reason two \t are applied after the log level.

What version of Winston presents the issue?

v3.11.0

What version of Node are you using?

v20

If this worked in a previous version of Winston, which was it?

No response

Minimum Working Example

const consolelogFormat = format.printf(({ level, message, timestamp }) => {
    return `${timestamp} ${level}: ${message}`;
});

const consoleLog = new transports.Console({
    format: format.combine(
        format.colorize(),
        format.align(),
        format.timestamp({ format: "YYYY-MM-DDTHH:mm:ss:SSS" }), // uses local timezone
        format.errors({ stack: true }),
        consolelogFormat
    )
});

image

Additional information

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant