Skip to content

Commit 6d269a3

Browse files
committed
Update changelog and readme for logging changes
- Update README to include section about configuring the logging settings. - Update CHANGELOG with information about breaking changes in the logging output from prometheus-community#942. Signed-off-by: Joe Adams <[email protected]>
1 parent 7a09a84 commit 6d269a3

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

CHANGELOG.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ BREAKING CHANGES:
44

55
The flag `--es.slm` has been renamed to `--collector.slm`.
66

7-
* [CHANGE] Rename --es.slm to --collector.slm #XXX
7+
The logging system has been replaced with log/slog from the stdlib. This change is being made across the prometheus ecosystem. The logging output has changed, but the messages and levels remain the same. The `ts` label for the timestamp has bewen replaced with `time`, the accuracy is less, and the timezone is not forced to UTC. The `caller` field has been replaced by the `source` field, which now includes the full path to the source file. The `level` field now exposes the log level in capital letters.
8+
9+
* [CHANGE] Rename --es.slm to --collector.slm #932
10+
* [CHANGE] Replace logging system #942
811

912
## 1.8.0 / 2024-09-14
1013

README.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ elasticsearch_exporter --help
5050

5151
| Argument | Introduced in Version | Description | Default |
5252
| ----------------------- | --------------------- |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| ----------- |
53-
| collector.clustersettings| 1.6.0 | If true, query stats for cluster settings (As of v1.6.0, this flag has replaced "es.cluster_settings"). | false |
53+
| collector.clustersettings| 1.6.0 | If true, query stats for cluster settings (As of v1.6.0, this flag has replaced "es.cluster_settings"). | false |
5454
| es.uri | 1.0.2 | Address (host and port) of the Elasticsearch node we should connect to. This could be a local node (`localhost:9200`, for instance), or the address of a remote Elasticsearch server. When basic auth is needed, specify as: `<proto>://<user>:<password>@<host>:<port>`. E.G., `http://admin:pass@localhost:9200`. Special characters in the user credentials need to be URL-encoded. | <http://localhost:9200> |
5555
| es.all | 1.0.2 | If true, query stats for all nodes in the cluster, rather than just the node we connect to. | false |
5656
| es.indices | 1.0.2 | If true, query stats for all indices in the cluster. | false |
@@ -78,6 +78,10 @@ For versions greater than `1.1.0rc1`, commandline parameters are specified with
7878

7979
The API key used to connect can be set with the `ES_API_KEY` environment variable.
8080

81+
#### Logging
82+
83+
Logging by the exporter is handled by the `log/slog` package. The output format can be customized with the `--log.format` flag which defaults to logfmt. The log level can be set with the `--log.level` flag which defaults to info. The output can be set to either stdout (default) or stderr with the `--log.output` flag.
84+
8185
#### Elasticsearch 7.x security privileges
8286

8387
Username and password can be passed either directly in the URI or through the `ES_USERNAME` and `ES_PASSWORD` environment variables.

0 commit comments

Comments
 (0)