예제 #1
0
/*ARGSUSED0*/
static void xmlWarning(
    void*       user_data,
    const char* msg,
    ...)
{
    va_list     args;

    va_start(args, msg);
    vulog(LOG_WARNING, msg, args);
    va_end(args);
}
예제 #2
0
/*
 * Logs a debuging message.
 *
 * This function is thread-safe.
 */
void nplDebug(
    const char* const fmt,  /**< The message format */
    ...)                    /**< Arguments referenced by the format */
{
    va_list     args;

    va_start(args ,fmt);
    lock();
    (void)vulog(LOG_DEBUG, fmt, args);
    unlock();
    va_end(args);
}
예제 #3
0
/*ARGSUSED0*/
static void xmlError(
    void*       user_data,
    const char* msg,
    ...)
{
    va_list     args;

    va_start(args, msg);
    vulog(LOG_ERR, msg, args);
    va_end(args);

    currState = ERROR;
}
예제 #4
0
/**
 * Logs a system error.
 *
 * This function is thread-safe.
 */
void nplSerror(
    const char* fmt,    /**< The message format */
    ...)                /**< Arguments referenced by the format */
{
    va_list     args;

    va_start(args, fmt);
    lock();
    ulog(LOG_ERR, "%s", strerror(errno));
    vulog(LOG_ERR, fmt, args);
    unlock();
    va_end(args);
}