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

Console log cleanup #784

Merged
merged 1 commit into from
Apr 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/op25_repeater/lib/p25_frame_assembler_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ p25_frame_assembler_impl::general_work (int noutput_items,
void p25_frame_assembler_impl::set_phase2_tdma(bool p) {
d_do_phase2_tdma = p;

BOOST_LOG_TRIVIAL(info) << "Setting TDMA to: " << p;
BOOST_LOG_TRIVIAL(debug) << "Setting TDMA to: " << p;
if (d_do_audio_output) {
if (d_do_phase2_tdma) {
d_input_rate = 6000;
Expand Down
2 changes: 1 addition & 1 deletion trunk-recorder/call_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ void Call_impl::conclude_call() {
if (!recorder) {
BOOST_LOG_TRIVIAL(error) << "Call_impl::end_call() State is recording, but no recorder assigned!";
}
BOOST_LOG_TRIVIAL(info) << "[" << sys->get_short_name() << "]\t\033[0;34m" << this->get_call_num() << "C\033[0m\tTG: " << this->get_talkgroup_display() << "\tFreq: " << format_freq(get_freq()) << "\t\u001b[33mConcluding Recorded Call_impl\u001b[0m - Last Update: " << this->since_last_update() << "s\tCall_impl Elapsed: " << this->elapsed();
BOOST_LOG_TRIVIAL(info) << "[" << sys->get_short_name() << "]\t\033[0;34m" << this->get_call_num() << "C\033[0m\tTG: " << this->get_talkgroup_display() << "\tFreq: " << format_freq(get_freq()) << "\t\u001b[33mConcluding Recorded Call\u001b[0m - Last Update: " << this->since_last_update() << "s\tCall_impl Elapsed: " << this->elapsed();

this->get_recorder()->stop();
transmission_list = this->get_recorder()->get_transmission_list();
Expand Down
12 changes: 6 additions & 6 deletions trunk-recorder/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,7 @@ void manage_calls() {
continue;
}*/
} else {
BOOST_LOG_TRIVIAL(error) << "[" << call->get_short_name() << "]\t\033[0;34m" << call->get_call_num() << "C\tTG: " << call->get_talkgroup_display() << "\tFreq: " << format_freq(call->get_freq()) << "\t\u001b[36m Call set to Inactive, but has no recorder\u001b[0m";
BOOST_LOG_TRIVIAL(error) << "[" << call->get_short_name() << "]\t\033[0;34m" << call->get_call_num() << "C\033[0m\tTG: " << call->get_talkgroup_display() << "\tFreq: " << format_freq(call->get_freq()) << "\t\u001b[36m Call set to Inactive, but has no recorder\u001b[0m";
}
}

Expand Down Expand Up @@ -1069,7 +1069,7 @@ void handle_call_grant(TrunkMessage message, System *sys) {
if ((call->get_talkgroup() == message.talkgroup) && (call->get_sys_num() == message.sys_num) && (call->get_freq() == message.freq) && (call->get_tdma_slot() == message.tdma_slot) && (call->get_phase2_tdma() == message.phase2_tdma)) {
call_found = true;

// BOOST_LOG_TRIVIAL(info) << "[" << call->get_short_name() << "]\t\033[0;34m" << call->get_call_num() << "C\tTG: " << call->get_talkgroup_display() << "\tFreq: " << format_freq(call->get_freq()) << "\t\u001b[36m GRANT Message for existing Call\u001b[0m";
// BOOST_LOG_TRIVIAL(info) << "[" << call->get_short_name() << "]\t\033[0;34m" << call->get_call_num() << "C\033[0m\tTG: " << call->get_talkgroup_display() << "\tFreq: " << format_freq(call->get_freq()) << "\t\u001b[36m GRANT Message for existing Call\u001b[0m";

if (call->get_state() == RECORDING) {
call->set_record_more_transmissions(true);
Expand All @@ -1092,7 +1092,7 @@ void handle_call_grant(TrunkMessage message, System *sys) {
if (recorder != NULL) {
recorder_state = format_state(recorder->get_state());
}
BOOST_LOG_TRIVIAL(info) << "[" << call->get_short_name() << "]\t\033[0;34m" << call->get_call_num() << "C\tTG: " << call->get_talkgroup_display() << "\tFreq: " << format_freq(call->get_freq()) << "\t\u001b[36mStopping RECORDING call, Recorder State: " << recorder_state << " RX overlapping TG message Freq, TG:" << message.talkgroup << "\u001b[0m";
BOOST_LOG_TRIVIAL(info) << "[" << call->get_short_name() << "]\t\033[0;34m" << call->get_call_num() << "C\033[0m\tTG: " << call->get_talkgroup_display() << "\tFreq: " << format_freq(call->get_freq()) << "\t\u001b[36mStopping RECORDING call, Recorder State: " << recorder_state << " RX overlapping TG message Freq, TG:" << message.talkgroup << "\u001b[0m";

call->set_state(COMPLETED);
call->conclude_call();
Expand All @@ -1109,7 +1109,7 @@ void handle_call_grant(TrunkMessage message, System *sys) {
if (recorder != NULL) {
recorder_state = format_state(recorder->get_state());
}
BOOST_LOG_TRIVIAL(info) << "[" << call->get_short_name() << "]\t\033[0;34m" << call->get_call_num() << "C\tTG: " << call->get_talkgroup_display() << "\tFreq: " << format_freq(call->get_freq()) << "\t\u001b[36mStopping INACTIVE call, Recorder State: " << recorder_state << " RX overlapping TG message Freq TG:" << message.talkgroup << "\u001b[0m";
BOOST_LOG_TRIVIAL(info) << "[" << call->get_short_name() << "]\t\033[0;34m" << call->get_call_num() << "C\033[0m\tTG: " << call->get_talkgroup_display() << "\tFreq: " << format_freq(call->get_freq()) << "\t\u001b[36mStopping INACTIVE call, Recorder State: " << recorder_state << " RX overlapping TG message Freq TG:" << message.talkgroup << "\u001b[0m";

call->set_state(COMPLETED);
call->conclude_call();
Expand Down Expand Up @@ -1190,9 +1190,9 @@ void handle_call_update(TrunkMessage message, System *sys) {
// Only a RECORDING call can be set to INACTIVE
// We should be safe to set it to RECORDING if it starts to get UPDATE messages
call->set_state(RECORDING);
BOOST_LOG_TRIVIAL(trace) << "[" << call->get_short_name() << "]\t\033[0;34m" << call->get_call_num() << "C\tTG: " << call->get_talkgroup_display() << "\tFreq: " << format_freq(call->get_freq()) << "\t\u001b[36m Reactivating an INACTIVE Call \u001b[0m";
BOOST_LOG_TRIVIAL(trace) << "[" << call->get_short_name() << "]\t\033[0;34m" << call->get_call_num() << "C\033[0m\tTG: " << call->get_talkgroup_display() << "\tFreq: " << format_freq(call->get_freq()) << "\t\u001b[36m Reactivating an INACTIVE Call \u001b[0m";
}
// BOOST_LOG_TRIVIAL(info) << "[" << call->get_short_name() << "]\t\033[0;34m" << call->get_call_num() << "C\tTG: " << call->get_talkgroup_display() << "\tFreq: " << format_freq(call->get_freq()) << "\t\u001b[36m Updating Call \u001b[0m";
// BOOST_LOG_TRIVIAL(info) << "[" << call->get_short_name() << "]\t\033[0;34m" << call->get_call_num() << "C\033[0m\tTG: " << call->get_talkgroup_display() << "\tFreq: " << format_freq(call->get_freq()) << "\t\u001b[36m Updating Call \u001b[0m";

// It is helpful to have both GRANT and UPDATE messages allow for new calls to be started
// This is because GRANT message can be sometimes dropped if the control channel is not perfect
Expand Down
2 changes: 1 addition & 1 deletion trunk-recorder/systems/system_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ bool System_impl::update_status(TrunkMessage message) {
sys_id = message.sys_id;
wacn = message.wacn;
nac = message.nac;
BOOST_LOG_TRIVIAL(info) << "[" << short_name << "]\tDecoding System_impl ID "
BOOST_LOG_TRIVIAL(info) << "[" << short_name << "]\tDecoding System ID "
<< std::hex << std::uppercase << message.sys_id << " WACN: "
<< std::hex << std::uppercase << message.wacn << " NAC: " << std::hex << std::uppercase << message.nac;
if (sys_id && wacn && nac) {
Expand Down