chore(outputs.remotefile): Deprecate trace option (#15970)
This commit is contained in:
parent
8561dedb07
commit
f42104fa06
|
|
@ -63,10 +63,6 @@ to use them.
|
||||||
## Maximum size of the cache on disk (infinite by default)
|
## Maximum size of the cache on disk (infinite by default)
|
||||||
# cache_max_size = -1
|
# cache_max_size = -1
|
||||||
|
|
||||||
## Output log messages of the underlying library as debug messages
|
|
||||||
## NOTE: You need to enable this option AND run Telegraf in debug mode!
|
|
||||||
# trace = false
|
|
||||||
|
|
||||||
## Data format to output.
|
## Data format to output.
|
||||||
## Each data format has its own unique set of configuration options, read
|
## Each data format has its own unique set of configuration options, read
|
||||||
## more about them here:
|
## more about them here:
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ type File struct {
|
||||||
WriteBackInterval config.Duration `toml:"cache_write_back"`
|
WriteBackInterval config.Duration `toml:"cache_write_back"`
|
||||||
MaxCacheSize config.Size `toml:"cache_max_size"`
|
MaxCacheSize config.Size `toml:"cache_max_size"`
|
||||||
UseBatchFormat bool `toml:"use_batch_format"`
|
UseBatchFormat bool `toml:"use_batch_format"`
|
||||||
Trace bool `toml:"trace"`
|
Trace bool `toml:"trace" deprecated:"1.33.0;1.35.0;use 'log_level = \"trace\"' instead"`
|
||||||
Log telegraf.Logger `toml:"-"`
|
Log telegraf.Logger `toml:"-"`
|
||||||
|
|
||||||
root *vfs.VFS
|
root *vfs.VFS
|
||||||
|
|
@ -81,10 +81,11 @@ func (f *File) Init() error {
|
||||||
|
|
||||||
// Redirect logging
|
// Redirect logging
|
||||||
fs.LogPrint = func(level fs.LogLevel, text string) {
|
fs.LogPrint = func(level fs.LogLevel, text string) {
|
||||||
if !f.Trace {
|
if f.Trace {
|
||||||
return
|
f.Log.Debugf("[%s] %s", level.String(), text)
|
||||||
|
} else {
|
||||||
|
f.Log.Tracef("[%s] %s", level.String(), text)
|
||||||
}
|
}
|
||||||
f.Log.Debugf("[%s] %s", level.String(), text)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Setup custom template functions
|
// Setup custom template functions
|
||||||
|
|
|
||||||
|
|
@ -33,10 +33,6 @@
|
||||||
## Maximum size of the cache on disk (infinite by default)
|
## Maximum size of the cache on disk (infinite by default)
|
||||||
# cache_max_size = -1
|
# cache_max_size = -1
|
||||||
|
|
||||||
## Output log messages of the underlying library as debug messages
|
|
||||||
## NOTE: You need to enable this option AND run Telegraf in debug mode!
|
|
||||||
# trace = false
|
|
||||||
|
|
||||||
## Data format to output.
|
## Data format to output.
|
||||||
## Each data format has its own unique set of configuration options, read
|
## Each data format has its own unique set of configuration options, read
|
||||||
## more about them here:
|
## more about them here:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue