Skip to content

ACAP program installation process #102

Closed Answered by daniel-falk
sinnrrr asked this question in ACAP
Discussion options

You must be logged in to vote

I think the standard for cameras is still to use init.d (even in FW 11.x) which means that stdout is not captured by the system log? To make debugging easier we use a library that logs both to stdout and to the system log, like this:

/* Log a message both to the system logger and to stdout */
void fapp_logger_log(int priority, const char *fmt, ...) {
  va_list args;

  /* Log to stdout */
  va_start(args, fmt);
  printf("%s: ", fapp_logger_level_to_str(priority));
  vprintf(fmt, args);
  printf("\n");
  va_end(args);

  /* Log to system logger */
  va_start(args, fmt);
  vsyslog(priority, fmt, args);
  va_end(args);
}

Some third party libraries logs only to stdout in which case it is much…

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@sinnrrr
Comment options

@mattias-kindborg-at-work
Comment options

@sinnrrr
Comment options

@daniel-falk
Comment options

Answer selected by vivekatoffice
@dsoltysiuk
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
ACAP
Labels
None yet
4 participants