Handling log level and log format
Question 1 - Log level In fluent bit there is an option to configure the log level using the "Log_Level" configuration Documentation - https://docs.fluentbit.io/manual/administration/configuring-fluent-bit/configuration-file
I would like to see some examples/pointers on how to read the same in the output plugin and perform logging appropriately.
Question 2 - Logging format What should be the logging format used by the plugin? I see no option in fluent-bit to configure the logging format (plain text vs structured etc) at fluent bit level.
Thanks in advance
See #8, logging to main Log_File is not supported in a Go plugin. PRs welcome.
In the below code, i see the log level is accessed through the env var FLB_LOG_LEVEL
https://github.com/aws/amazon-kinesis-firehose-for-fluent-bit/blob/9c442bbad45ccf975899d813bb4b319b61d21a4e/plugins/plugins.go#L31
I am not really sure has to how this env variable gets injected. @l2dy If possible can you point me towards the documentation for this? I was not able to find any in the official documentation?
It's not injected by Fluent Bit. Instead, Fluent Bit itself also checks this environment variable.
https://github.com/fluent/fluent-bit/blob/03f3339594bdb472315823db78ca209b7ba319fb/src/flb_config.c#L433-L441
Reviving an old issue but would it be possible to get a short example on how to use, if it still is possible. If not, get some hints on where to start to add this?