fix(enterprise/cli): add CODER_PROVISIONER_DAEMON_LOG_* options (#11279)

- Extracts cli.BuildLogger to clilog package
- Updates existing usage of cli.BuildLogger and removes it
- Use clilog to initialize provisionerd logger
This commit is contained in:
Cian Johnston
2023-12-19 16:49:50 +00:00
committed by GitHub
parent 7c4fbe5bae
commit d2d7628522
8 changed files with 587 additions and 128 deletions
+47
View File
@@ -22,6 +22,43 @@ coder provisionerd start [flags]
Directory to store cached data.
### --log-filter
| | |
| ----------- | ------------------------------------------------- |
| Type | <code>string-array</code> |
| Environment | <code>$CODER_PROVISIONER_DAEMON_LOG_FILTER</code> |
Filter debug logs by matching against a given regex. Use .\* to match all debug logs.
### --log-human
| | |
| ----------- | ---------------------------------------------------- |
| Type | <code>string</code> |
| Environment | <code>$CODER_PROVISIONER_DAEMON_LOGGING_HUMAN</code> |
| Default | <code>/dev/stderr</code> |
Output human-readable logs to a given file.
### --log-json
| | |
| ----------- | --------------------------------------------------- |
| Type | <code>string</code> |
| Environment | <code>$CODER_PROVISIONER_DAEMON_LOGGING_JSON</code> |
Output JSON logs to a given file.
### --log-stackdriver
| | |
| ----------- | ---------------------------------------------------------- |
| Type | <code>string</code> |
| Environment | <code>$CODER_PROVISIONER_DAEMON_LOGGING_STACKDRIVER</code> |
Output Stackdriver compatible logs to a given file.
### --name
| | |
@@ -68,3 +105,13 @@ Pre-shared key to authenticate with Coder server.
| Environment | <code>$CODER_PROVISIONERD_TAGS</code> |
Tags to filter provisioner jobs by.
### --verbose
| | |
| ----------- | ---------------------------------------------- |
| Type | <code>bool</code> |
| Environment | <code>$CODER_PROVISIONER_DAEMON_VERBOSE</code> |
| Default | <code>false</code> |
Output debug-level logs.