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

rename to_syslog_severity to parse_syslog_severity #141

Open
JeanMertz opened this issue Jan 9, 2021 · 3 comments
Open

rename to_syslog_severity to parse_syslog_severity #141

JeanMertz opened this issue Jan 9, 2021 · 3 comments
Labels
vrl: stdlib Changes to the standard library

Comments

@JeanMertz
Copy link
Contributor

This one is incorrectly named. It behaves similar to other parse_* functions (take in a string, try to parse it to the relevant type, error if it can't), but is named as a to_* function.

@binarylogic
Copy link
Contributor

It should be named parse_syslog_level, which is less obvious that it's returning a severity number. I am personally a fan of keeping it named to_syslog_severity and have it accept a string and int:

to_syslog_severity("info") => 2
to_syslog_severity(2) => 2

@JeanMertz JeanMertz added the vrl: stdlib Changes to the standard library label Jun 7, 2022
@jszwedko
Copy link
Member

Discussed and decided to go with parse_syslog_severity to match other parsing functions.

@jszwedko
Copy link
Member

Might be a little bit of extra work here if it is the first function we are deprecating and aliasing.

@fuchsnj fuchsnj transferred this issue from vectordotdev/vector Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
vrl: stdlib Changes to the standard library
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants