Skip to content

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