-
Notifications
You must be signed in to change notification settings - Fork 340
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
prival to string function #245
Comments
Hello, can you assign this issue to me please? |
Sorry, I haven't started this issue yet, I had a lot in work, but I'll do it this week. |
No worries, thanks very much for the update! |
Hello, I wanted just to let you know, that I caught covid this week and I can't program at the moment because of it. Are you in a hurry with this issue? I suppose, that for the next week, if I feel better, I would have already finished it. |
No worries at all, We wish you a speedy recovery! |
Hello, I just want to let you know that I am still working on this issue, I just have a more difficult course of covid, so it will take a while. |
Please see PR #413 |
Entries have both a facility and a severity, combined into a value called the prival. While the individual portions can be converted to strings already, the prival itself does not currently have a function to do this. This will be a necessary function to create in order to easily make an entry into a string. Your task is to implement this function.
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.
You'll need to create a new header file for this function,
include/stumpless/prival.h
. You can copyinclude/stumpless/severity.h
as a template, and alter it as needed. Once this is done, add a new function with the following signature:Next, create a matching file
src/prival.c
to hold your implementation. You'll need to update theCMakeLists.txt
file to include the new file in the build. Use the severity and facility to string functions to build the prival string. Use|
to separate the severity and the facility strings, putting the severity first.Finally, you'll need to also create a new test suite to hold the tests for your function. Once again, you can copy the
test/function/severity.cpp
test suite to hold your new test. And of course, you'll need to add this test suite to the CMake build file as well.The text was updated successfully, but these errors were encountered: