Open goatshriek opened 1 month ago
Hi, I would like to work on this. This would be my first contribution. My background is mostly C++ and some C.
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? This one seems to not be assigned. But if someone is working on it I am interested in trying entry to string as well.
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).
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.