/*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);
}
Exemple #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);
}
/*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;
}
Exemple #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);
}