[Linux] Syslogd로 출력하는 코드

This topic contains 0 replies, has 1 voice, and was last updated by  technote 2017-10-17 19:34.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #126

    technote
    Keymaster

    #include <syslog.h> vsyslog(syslog_priority(level), fmt, ap); static int syslog_priority(int level) { switch (level) { case MSG_MSGDUMP: case MSG_DEBUG: return LOG_DEBUG; case MSG_INFO: return LOG_NOTICE; case MSG_WARNING: return LOG_WARNING; case MSG_ERROR: return LOG_ERR; } return LOG_INFO; } enum { MSG_EXCESSIVE, MSG_MSGDUMP, MSG_DEBUG, MSG_INFO, MSG_WARNING, MSG_ERROR };

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.