Skip to content

Commit

Permalink
[nrf fromlist] Fix build issues without syslog
Browse files Browse the repository at this point in the history
This should be controlled by syslog feature define.

Upstream-Pr: Wi-FiQuickTrack/Wi-FiQuickTrack-ControlAppC#5

Signed-off-by: Chaitanya Tata <[email protected]>
  • Loading branch information
krish2718 committed Aug 2, 2023
1 parent 33dd6fd commit 0555304
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@
#include <string.h>
#include <stdarg.h>
#include <stdlib.h>
#ifdef _SYSLOG_
#include <syslog.h>
#endif
#include <fcntl.h>
#include <unistd.h>
#include <sys/wait.h>
Expand Down Expand Up @@ -91,7 +93,9 @@ void debug_print_timestamp(void) {
void indigo_logger(int level, const char *fmt, ...) {
char *format, *log_type;
int maxlen;
#ifdef _SYSLOG_
int priority;
#endif
va_list ap;

maxlen = strlen(fmt) + 100;
Expand Down Expand Up @@ -139,6 +143,7 @@ void indigo_logger(int level, const char *fmt, ...) {
#endif
}

#ifdef _SYSLOG_
if (level >= stdout_level) {
switch (level) {
case LOG_LEVEL_DEBUG_VERBOSE:
Expand All @@ -162,6 +167,7 @@ void indigo_logger(int level, const char *fmt, ...) {
vsyslog(priority, format, ap);
va_end(ap);
}
#endif
}

void open_tc_app_log() {
Expand Down

0 comments on commit 0555304

Please sign in to comment.