Access to logger
- Dominant language
- Go
- Stars
- 202
- Forks
- 61
- Avg merge
- 7d 20h
- Merged PRs (30d)
- 2
Description
I implemented a redis output plugin: https://github.com/majst01/fluent-bit-go-redis-output and i want to log errors during configuration parsing or processing. Currently i do this with a simple fmt.Printf(). This is not perfect as this will come out on stdout instead of the configured log destination. It also does look different than other existing log entries and there is not destinction between info/debug/error etc.
I have already seen in flb_log.h there are already handy macros defined:
```c
/* Logging macros */
#define flb_error(fmt, ...) \
if (flb_log_check(FLB_LOG_ERROR)) \
flb_log_print(FLB_LOG_ERROR, NULL, 0, fmt, ##__VA_ARGS__)
#define flb_warn(fmt, ...) \
if (flb_log_check(FLB_LOG_WARN)) \
flb_log_print(FLB_LOG_WARN, NULL, 0, fmt, ##__VA_ARGS__)
#define flb_info(fmt, ...) \
if (flb_log_check(FLB_LOG_INFO)) \
flb_log_print(FLB_LOG_INFO, NULL, 0, fmt, ##__VA_ARGS__)
```
but the current implementation of fluent-bit-go does not expose them to to golang interface. Can someone give hints howto start, im willing to implement this or help someone to do so.
Greetings and congrats to this simple but working api !
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.