2021-06-07 00:17:03 +02:00
|
|
|
/*
|
2023-01-06 15:36:05 -05:00
|
|
|
* 86Box A hypervisor and IBM PC system emulator that specializes in
|
|
|
|
|
* running old operating systems and software designed for IBM
|
|
|
|
|
* PC systems and compatibles from 1981 through fairly recent
|
|
|
|
|
* system designs based on the PCI bus.
|
2021-06-07 00:17:03 +02:00
|
|
|
*
|
2023-01-06 15:36:05 -05:00
|
|
|
* This file is part of the 86Box distribution.
|
2021-06-07 00:17:03 +02:00
|
|
|
*
|
2025-01-28 16:26:28 +01:00
|
|
|
* New logging system handler header.
|
2021-06-07 00:17:03 +02:00
|
|
|
*
|
2023-01-06 15:36:05 -05:00
|
|
|
* Authors: Miran Grca, <mgrca8@gmail.com>
|
|
|
|
|
* Fred N. van Kempen, <decwiz@yahoo.com>
|
2025-01-28 16:26:28 +01:00
|
|
|
* Connor Hyde, <mario64crashed@gmail.com, nomorestarfrost@gmail.com>
|
2021-06-07 00:17:03 +02:00
|
|
|
*
|
2025-01-28 16:26:28 +01:00
|
|
|
* Copyright 2021-25 Miran Grca.
|
|
|
|
|
* Copyright 2021-25 Fred N. van Kempen.
|
2025-01-14 00:31:13 +00:00
|
|
|
* Copyright 2025 Connor Hyde.
|
2021-06-07 00:17:03 +02:00
|
|
|
*/
|
2022-02-18 19:42:21 -05:00
|
|
|
|
2021-06-07 00:17:03 +02:00
|
|
|
#ifndef EMU_LOG_H
|
2022-09-18 17:15:38 -04:00
|
|
|
#define EMU_LOG_H
|
2021-06-07 00:17:03 +02:00
|
|
|
|
2022-09-18 17:15:38 -04:00
|
|
|
# ifdef __cplusplus
|
2021-06-07 00:17:03 +02:00
|
|
|
extern "C" {
|
2022-09-18 17:15:38 -04:00
|
|
|
# endif
|
2021-06-07 00:17:03 +02:00
|
|
|
|
2025-03-23 00:42:51 +09:00
|
|
|
#ifdef __NetBSD__
|
|
|
|
|
/* Doesn't compile on NetBSD without this include */
|
|
|
|
|
#include <stdarg.h>
|
|
|
|
|
#endif
|
|
|
|
|
|
2025-08-09 15:03:12 +02:00
|
|
|
#define LOG_SIZE_BUFFER 8192 /* Log size buffer */
|
2025-01-14 00:31:13 +00:00
|
|
|
#define LOG_SIZE_BUFFER_CYCLIC_LINES 32 /* Cyclic log size buffer (number of lines that should be cehcked) */
|
|
|
|
|
#define LOG_MINIMUM_REPEAT_ORDER 4 /* Minimum repeat size */
|
|
|
|
|
|
2021-06-07 00:17:03 +02:00
|
|
|
/* Function prototypes. */
|
2022-09-18 17:15:38 -04:00
|
|
|
extern void log_set_suppr_seen(void *priv, int suppr_seen);
|
|
|
|
|
extern void log_set_dev_name(void *priv, char *dev_name);
|
2025-01-28 16:26:28 +01:00
|
|
|
#ifndef RELEASE_BUILD
|
2022-09-18 17:15:38 -04:00
|
|
|
extern void log_out(void *priv, const char *fmt, va_list);
|
2025-01-14 00:31:13 +00:00
|
|
|
extern void log_out_cyclic(void* priv, const char *fmt, va_list);
|
2025-01-28 16:26:28 +01:00
|
|
|
#endif /*RELEASE_BUILD*/
|
2022-09-18 17:15:38 -04:00
|
|
|
extern void log_fatal(void *priv, const char *fmt, ...);
|
2025-03-22 00:49:20 +01:00
|
|
|
extern void log_warning(void *priv, const char *fmt, ...);
|
2025-01-28 16:26:28 +01:00
|
|
|
extern void *log_open(const char *dev_name);
|
|
|
|
|
extern void *log_open_cyclic(const char *dev_name);
|
2022-09-18 17:15:38 -04:00
|
|
|
extern void log_close(void *priv);
|
2021-06-07 00:17:03 +02:00
|
|
|
|
2022-09-18 17:15:38 -04:00
|
|
|
# ifdef __cplusplus
|
2021-06-07 00:17:03 +02:00
|
|
|
}
|
2022-09-18 17:15:38 -04:00
|
|
|
# endif
|
2021-06-07 00:17:03 +02:00
|
|
|
|
2022-09-18 17:15:38 -04:00
|
|
|
#endif /*EMU_LOG_H*/
|