Skip to content

Commit e342778

Browse files
committed
update regex filter config name
1 parent 2e0411f commit e342778

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Diff for: README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ Jan 1 12:01:21 hostname appname[1234]: message
2828
```
2929
Usage of ./tinysyslog:
3030
--address string IP and port to listen on. (default "127.0.0.1:5140")
31-
--filter string Filter to filter logs with. Valid filters are: null and regex. Null doesn't do any filtering.
32-
--filter-regex-filter string Regex to filter with. No filtering by default.
31+
--filter string Filter to filter logs with. Valid filters are: null and regex. Null doesn't do any filtering. (default "null")
32+
--filter-regex string Regex to filter with.
3333
--log-file string The log file to write to. 'stdout' means log to stdout and 'stderr' means log to stderr. (default "stdout")
3434
--log-format string The log format. Valid format values are: text, json. (default "text")
3535
--log-level string The granularity of log outputs. Valid level names are: debug, info, warning, error and critical. (default "info")

Diff for: config/config.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ func (cnf *Config) AddFlags(fs *pflag.FlagSet) {
7373
fs.StringVar(&cnf.Address, "address", cnf.Address, "IP and port to listen on.")
7474
fs.StringVar(&cnf.FilterType, "filter", cnf.FilterType, "Filter to filter logs with. Valid filters are: null and regex. " +
7575
"Null doesn't do any filtering.")
76-
fs.StringVar(&cnf.RegexFilter.Regex, "filter-regex-filter", cnf.RegexFilter.Regex, "Regex to filter with. No filtering by default.")
76+
fs.StringVar(&cnf.RegexFilter.Regex, "filter-regex", cnf.RegexFilter.Regex, "Regex to filter with.")
7777
fs.StringVar(&cnf.LogFile, "log-file", cnf.LogFile, "The log file to write to. "+
7878
"'stdout' means log to stdout and 'stderr' means log to stderr.")
7979
fs.StringVar(&cnf.LogFormat, "log-format", cnf.LogFormat, "The log format. Valid format values are: text, json.")

0 commit comments

Comments
 (0)