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

Improved Talkgroup Priority Logging #700

Merged
merged 10 commits into from
Sep 16, 2022

Conversation

tadscottsmith
Copy link
Contributor

This adds the ability to assign a talkgroup a priority of -1 to ensure that it is never recorded. This also cleans up the log messages for talkgroup priority based actions to differentiate between when a talkgroup is purposely not recorded (informational) and a talkgroup is not recorded due to a lack or recorders (error).

@Dewey3
Copy link

Dewey3 commented Jun 8, 2022

Thank you. Can I continue using 255, or do recommend the -1 from now on?

@tadscottsmith
Copy link
Contributor Author

This shouldn't change the behavior, it just changes how log messages are displayed. In your example, if you used 255 you would see an error similar to this:

[2022-06-07 21:25:36.972889] (error)   [SYSTEM] 275C    TG:           TALKGROUP (     11111)        Freq: 851.662500 MHz    Not recording talkgroup. Priority is 255 but only 4 recorders are available.

If you changed the talkgroup to -1, it would now print out an informational level message similar to this:

[2022-06-07 21:25:24.188182] (info)   [SYSTEM]  261C    TG:         TALKGROUP (      22222)        Freq: 852.712500 MHz    Not recording talkgroup. Priority is -1.

The intent is to clearly differentiate in the logs between when a talkgroup is being ignored on purpose (priority -1) and when there is a lack of recorders available.

@Dewey3
Copy link

Dewey3 commented Jun 8, 2022

Ahh, thank you both... I like!

@tadscottsmith
Copy link
Contributor Author

@robotastic I know you're a busy guy, but I'm just curious if there's something that concerns you with the change of behavior here, or if there's anything you want me to change to get it committed? I think this would be a great help for those of us who are really only monitoring error level messages.

@robotastic
Copy link
Owner

Sorry!! This slipped by me. This looks like a good change to me. I had been recommending just to use a high number, but you are correct that it is better to differentiate between the 2 different cases. thanks for adding this!

@robotastic robotastic merged commit 53a66da into robotastic:master Sep 16, 2022
@tadscottsmith tadscottsmith deleted the recorder-logging branch May 23, 2023 21:49
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