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

Already on GitHub? Sign in to your account

Allow log output format configuration #10907

Closed
leonheess opened this issue Nov 13, 2022 · 3 comments
Closed

Allow log output format configuration #10907

leonheess opened this issue Nov 13, 2022 · 3 comments
Labels
documentation Improvements or additions to documentation

Comments

@leonheess
Copy link

leonheess commented Nov 13, 2022

Allow the user to configure certain properties to influence how the log output is formatted. It could look something like this:

export default defineConfig({
  log: {
    disableIndentation: true,         // no space at the beginning of each log message
    hideTimestamp: true,              // no timestamps
    hideLabel: true,                  // no "[ v i t e ]"
    disableColors: false,             // helpful to colorblind people
    highContrast: false,              // helpful to colorblind people
    ...                               // these are just some examples, there could be many more options
  },
});

This would make it easier to use Vite with process managers that already add timestamps and labels to logs

@leonheess leonheess changed the title Configure log formatting output Allow log output format configuration Nov 13, 2022
@bluwy
Copy link
Member

bluwy commented Nov 14, 2022

I think you can use the customLogger option to achieve those. Looks like we forgot to document that.

@bluwy bluwy added documentation Improvements or additions to documentation and removed enhancement: pending triage labels Nov 14, 2022
@leonheess
Copy link
Author

Potentially relevant:

#1220

https://github.com/vitejs/vite/pull/10108/files#diff-f7d4a01431aa2057a8d0c4ff1b1c233af89820b533c5fe3a64bc813eee69bab0

@bluwy
Copy link
Member

bluwy commented Feb 28, 2023

Custom logger is now documented in #10108

@bluwy bluwy closed this as completed Feb 28, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Mar 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants