-
Notifications
You must be signed in to change notification settings - Fork 382
Description
Version
v1.67.0
Describe the bug
I have the following config
[FILTER]
name record_modifier
alias systemd_modifier
match system-bundle.systemd.*
whitelist_key _CMDLINE
whitelist_key _EXE
whitelist_key _HOSTNAME
whitelist_key _PID
whitelist_key MESSAGE
whitelist_key SYSLOG_IDENTIFIER
record filename systemd
To read this config, i use the following code
configData, err = ini.LoadSources(ini.LoadOptions{KeyValueDelimiters: " ", KeyValueDelimiterOnWrite: " ", AllowNonUniqueSections: true, InsensitiveKeys: true, AllowShadows: true, AllowNestedValues: true}, inputConfig)
With this, once the data is read, i write to a file. the output in file looks like. Please look at whitelist_key key
[FILTER]
name record_modifier
alias systemd_modifier
match system-bundle.systemd.*
whitelist_key _CMDLINE
whitelist_key _EXE
whitelist_key _HOSTNAME
whitelist_key _PID
whitelist_key MESSAGE
whitelist_key SYSLOG_IDENTIFIER
record filename systemd
To reproduce
configData, err = ini.LoadSources(ini.LoadOptions{KeyValueDelimiters: " ", KeyValueDelimiterOnWrite: " ", AllowNonUniqueSections: true, InsensitiveKeys: true, AllowShadows: true, AllowNestedValues: true}, inputConfig)
Expected behavior
expected to parse and write config in the format
[FILTER]
name record_modifier
alias systemd_modifier
match system-bundle.systemd.*
whitelist_key _CMDLINE
whitelist_key _EXE
whitelist_key _HOSTNAME
whitelist_key _PID
whitelist_key MESSAGE
whitelist_key SYSLOG_IDENTIFIER
record filename systemd
Additional context
No response
Code of Conduct
- I agree to follow this project's Code of Conduct