Skip to content

Commit

Permalink
Add stderr logging for sai metadata (sonic-net#294)
Browse files Browse the repository at this point in the history
Log warn and error messages on stderr for sai metadata checks.
  • Loading branch information
kcudnik authored Feb 12, 2018
1 parent c9e25ec commit 5bb9fb8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions saiplayer/saiplayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1344,9 +1344,11 @@ void sai_meta_log_syncd(
break;
case SAI_LOG_LEVEL_ERROR:
p = swss::Logger::SWSS_ERROR;
fprintf(stderr, "ERROR: %s: %s", func, buffer);
break;
case SAI_LOG_LEVEL_WARN:
p = swss::Logger::SWSS_WARN;
fprintf(stderr, "WARN: %s: %s", func, buffer);
break;
case SAI_LOG_LEVEL_CRITICAL:
p = swss::Logger::SWSS_CRIT;
Expand Down
2 changes: 2 additions & 0 deletions syncd/syncd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3217,9 +3217,11 @@ void sai_meta_log_syncd(
break;
case SAI_LOG_LEVEL_ERROR:
p = swss::Logger::SWSS_ERROR;
fprintf(stderr, "ERROR: %s: %s", func, buffer);
break;
case SAI_LOG_LEVEL_WARN:
p = swss::Logger::SWSS_WARN;
fprintf(stderr, "WARN: %s: %s", func, buffer);
break;
case SAI_LOG_LEVEL_CRITICAL:
p = swss::Logger::SWSS_CRIT;
Expand Down

0 comments on commit 5bb9fb8

Please sign in to comment.