Adding upstream version 1.34.4.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
e393c3af3f
commit
4978089aab
4963 changed files with 677545 additions and 0 deletions
19
plugins/processors/starlark/testdata/logging.star
vendored
Normal file
19
plugins/processors/starlark/testdata/logging.star
vendored
Normal file
|
@ -0,0 +1,19 @@
|
|||
# Example of the way to log a message with all the supported levels
|
||||
# using the logger of Telegraf.
|
||||
#
|
||||
# Example Input:
|
||||
# log debug="a debug message" 1465839830100400201
|
||||
#
|
||||
# Example Output:
|
||||
# log debug="a debug message" 1465839830100400201
|
||||
|
||||
load("logging.star", "log")
|
||||
# loads log.debug(), log.info(), log.warn(), log.error()
|
||||
|
||||
def apply(metric):
|
||||
log.debug("debug: {}".format(metric.fields["debug"]))
|
||||
log.info("an info message")
|
||||
log.warn("a warning message")
|
||||
log.error("an error message")
|
||||
return metric
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue