-
Notifications
You must be signed in to change notification settings - Fork 342
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
priority to string function #450
Comments
Hi, |
There is already PR #457 open to resolve this issue. Are there any other issues in the repository that you are interested in? There may be some more to string function implementation issues added in the next week or so as well. |
Oh okay. Can I work on param into string function in that case? |
Either of those should be fine! Whichever you would like can be assigned, just drop a comment on the issue you'd like (not here). |
Hello @KlowdfurrRad and @goatshriek. |
With no response from the original author, I think you're safe to bring it across the finish line. Abandoned PRs are not uncommon, particularly around Hacktoberfest. |
Resolved by #476. |
A function exists to get the string representation of a prival,
stumpless_get_prival_string
, which returns a string version of the two enumerations used to create the prival. However, this is longer and more verbose than need be, and a more succinct representation would follow the priority string convention used by tools like logger, for examplelocal3.info
. You will write a second function that generates this shorter form string for a prival.General Approach
There are a few details left out of the following approach, for you to fill in as you encounter them. If you find you need help, please ask here or on the project gitter and someone can help you get past the stumbling block.
First, read this section of the development documentation on adding new functions. Once you understand how this process works, start defining the new function.
Review the existing implementation of
stumpless_get_prival_string
insrc/prival.c
. Once you understand how the current implementation works, start adding the new functionality to the same file and the associated header, in a function namedstumpless_get_priority_string
.Note that
stumpless_prival_from_string
accepts strings in the same format offacility.severity
. You can reference this implementation for ideas on how to implement the new function.Add tests for your new functionality in the existing test module
test/function/prival.cpp
, based on the tests already there.The text was updated successfully, but these errors were encountered: