Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scl: add qbittorrent() and pihole-ftl() sources #4760

Merged
merged 3 commits into from Jan 4, 2024

Conversation

alltilla
Copy link
Collaborator

No description provided.

See: https://github.com/pi-hole/FTL

The FTL (Faster Than Light) logs are the logs which can be found
in the "Tools" / "Pi-hole diagnosis" menu.

The severity of the logs are not really formatted coherently, I have
applied this regexp to find the current set of severities:

$ git grep -Eho 'logg\("[a-zA-Z]+:' | sort | uniq
logg("API:
logg("APR:
logg("Backtrace:
logg("dbquery:
logg("DEBUG:
logg("ERR:
logg("Error:
logg("ERROR:
logg("Executing:
logg("FATAL:
logg("HINT:
logg("INFO:
logg("Interfaces:
logg("Notice:
logg("Received:
logg("Regex:
logg("Script:
logg("SQL:
logg("WARN:
logg("Warning:
logg("WARNING:

Signed-off-by: Attila Szakacs <szakacs.attila96@gmail.com>
Signed-off-by: Attila Szakacs <szakacs.attila96@gmail.com>
rewrite { set-severity("info"); };
} elif (match("^(DEBUG):$" value("2"))) {
rewrite { set-severity("debug"); };
} else {};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it would make sense to write a severity-parser() that can be parametrized with patterns but uses a sensible default so that we don't need to write similar constructs.

Also, you should not need the dangling else{} at the end.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The severity-parser() is just an idea, it's not a dependency of this PR.

Also, this could be rewritten as:

if ("$2" == "FATAL") {
} elif ("$2" == "ERR") {

although this does not support regexps.

@bazsi bazsi mentioned this pull request Dec 27, 2023
@MrAnno
Copy link
Collaborator

MrAnno commented Jan 3, 2024

@MrAnno MrAnno merged commit be60097 into syslog-ng:master Jan 4, 2024
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants