Skip to content

feat: add default value for LogOptions to createLogger #19897

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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Blaubeeree
Copy link

Description

Add an option to define a default value for LogOptions when creating a Logger. This can be used e.g. to create a Logger that per default prints out a timestamp without having to specify every time:

let logger = createLogger("info", {defaultLogOptions: {timestamp: true}})
logger.info("Hello World!")
// 5:47:54 PM [vite] Hello World!

@Blaubeeree Blaubeeree changed the title add default value for LogOptions to createLogger feat: add default value for LogOptions to createLogger Apr 19, 2025
@Blaubeeree Blaubeeree force-pushed the Blaubeeree/patch-64866 branch from a338bea to 92eb3e1 Compare April 19, 2025 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant