Skip to content

Commit 1bff3b4

Browse files
committed
feat: change default logging format to JSON
- Update default logging format from 'text' to 'json' in config.go - Update config.example.yaml to use JSON format - Update README.md example to show JSON format - Align with other exporter projects that default to JSON logging
1 parent 2855e71 commit 1bff3b4

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ server:
2222

2323
logging:
2424
level: "info"
25-
format: "text"
25+
format: "json"
2626

2727
metrics:
2828
collection:

config.example.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ server:
44

55
logging:
66
level: "info"
7-
format: "text"
7+
format: "json"
88

99
metrics:
1010
collection:

internal/config/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ func LoadConfig(path string) (*Config, error) {
136136
}
137137

138138
if config.Logging.Format == "" {
139-
config.Logging.Format = "text"
139+
config.Logging.Format = "json"
140140
}
141141

142142
return &config, nil

0 commit comments

Comments
 (0)