8000 Remove color code in logger by floppyhammer · Pull Request #6 · OpenIPC/devourer · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Remove color code in logger #6

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

Merged
merged 1 commit into from
Jan 20, 2025
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
13 changes: 5 additions & 8 deletions src/RadioManagementModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,12 @@ void RadioManagementModule::PHY_HandleSwChnlAndSetBW8812(
ChannelWidth_t ChnlWidth, uint8_t ChnlOffsetOf40MHz,
uint8_t ChnlOffsetOf80MHz, uint8_t CenterFrequencyIndex1) {
_logger->info(
"=> PHY_HandleSwChnlAndSetBW8812: bSwitchChannel {}, bSetBandWidth * {}",
"[{}] bSwitchChannel {}, bSetBandWidth {}", __func__,
bSwitchChannel, bSetBandWidth);

/* check is swchnl or setbw */
if (!bSwitchChannel && !bSetBandWidth) {
_logger->error("PHY_HandleSwChnlAndSetBW8812: not switch channel and "
"not set bandwidth");
_logger->error("[{}]: not switch channel and not set bandwidth", __func__);
return;
}

Expand All @@ -175,8 +174,7 @@ void RadioManagementModule::PHY_HandleSwChnlAndSetBW8812(
}

if (!_setChannelBw && !_swChannel && _needIQK != true) {
_logger->error("<= PHY_HandleSwChnlAndSetBW8812: SwChnl {}, "
"_setChannelBw {}",
_logger->error("[{}]: _swChannel {}, _setChannelBw {}", __func__,
_swChannel, _setChannelBw);
return;
}
Expand Down Expand Up @@ -357,8 +355,7 @@ void RadioManagementModule::PHY_SwitchWirelessBand8812(BandType Band) {
ChannelWidth_t current_bw = _currentChannelBw;
bool eLNA_2g = _eepromManager->ExternalLNA_2G;

_logger->info("==>PHY_SwitchWirelessBand8812() {}",
((Band == BandType::BAND_ON_2_4G) ? "2.4G" : "5G"));
_logger->info("[{}] {}", __func__, Band == BandType::BAND_ON_2_4G ? "2.4G" : "5G");

current_band_type = Band;

Expand Down Expand Up @@ -1173,7 +1170,7 @@ void RadioManagementModule::PHY_SetTxPowerIndex_8812A(uint32_t powerIndex,

void RadioManagementModule::phy_set_tx_power_index_by_rate_section(
RfPath rfPath, uint8_t channel, RATE_SECTION rateSection) {
_logger->debug("SET_TX_POWER {}; {}; {}", (int)rfPath, (int)channel,
_logger->debug("SET_TX_POWER {} - {} - {}", (int)rfPath, (int)channel,
(int)rateSection);

if (rateSection >= RATE_SECTION::RATE_SECTION_NUM) {
Expand Down
13 changes: 4 additions & 9 deletions src/logger.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@
#else
#include <cstdio>

#define RESET "\033[0m"
#define RED "\033[31m"
#define GREEN "\033[32m"
#define YELLOW "\033[33m"

#define DEVOURER_LOGV(...) \
printf("<%s>", DEVOURER_LOG_TAG); \
printf(__VA_ARGS__); \
Expand All @@ -42,13 +37,13 @@
printf(__VA_ARGS__); \
printf("\n")
#define DEVOURER_LOGW(...) \
printf(YELLOW "<%s>", DEVOURER_LOG_TAG); \
printf("<%s>", DEVOURER_LOG_TAG); \
printf(__VA_ARGS__); \
printf("\n" RESET)
printf("\n")
#define DEVOURER_LOGE(...) \
printf(RED "<%s>", DEVOURER_LOG_TAG); \
printf("<%s>", DEVOURER_LOG_TAG); \
printf(__VA_ARGS__); \
printf("\n" RESET)
printf("\n")
#endif

template<typename T>
Expand Down
Loading
0