mirror of
https://gitlab.com/gnuwget/wget2.git
synced 2026-02-01 14:41:08 +00:00
* include/wget/wget.h: Add prototype * libwget/Makefile.am: Add logger.h * libwget/log.c: Include logger.h * libwget/logger.c: Include logger.h, add wget_logger_is_active() * libwget/net.c: Use wget_logger_is_active() * libwget/private.h: Remove struct _wget_logger_st
42 lines
1.3 KiB
C
42 lines
1.3 KiB
C
/*
|
|
* Copyright(c) 2017 Free Software Foundation, Inc.
|
|
*
|
|
* This file is part of libwget.
|
|
*
|
|
* Libwget is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* Libwget is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU Lesser General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
* along with Libwget. If not, see <http://www.gnu.org/licenses/>.
|
|
*
|
|
*
|
|
* Header file shared between logger.c and log.c
|
|
*/
|
|
|
|
#ifndef _LIBWGET_LOGGER_H
|
|
# define _LIBWGET_LOGGER_H
|
|
|
|
#include <stdio.h>
|
|
#include <stdarg.h>
|
|
#include <errno.h>
|
|
|
|
#include <wget.h>
|
|
|
|
// _WGET_LOGGER is shared between log.c and logger.c, but must not be exposed to the public
|
|
struct _wget_logger_st {
|
|
FILE *fp;
|
|
const char *fname;
|
|
void (*func)(const char *buf, size_t bufsize);
|
|
void (*vprintf)(const wget_logger_t *logger, const char *fmt, va_list args) G_GNUC_WGET_PRINTF_FORMAT(2,0);
|
|
void (*write)(const wget_logger_t *logger, const char *buf, size_t bufsize);
|
|
};
|
|
|
|
#endif /* _LIBWGET_LOGGER_H */
|