--- freem/src/log.h 2025/01/19 02:04:04 1.1 +++ freem/src/log.h 2025/04/15 16:49:36 1.6 @@ -1,23 +1,11 @@ /* - * * - * * * - * * * - * *************** - * * * * * - * * MUMPS * - * * * * * - * *************** - * * * - * * * - * * - * - * log.h - * freem error logging + * $Id: log.h,v 1.6 2025/04/15 16:49:36 snw Exp $ + * freem error logging * * - * Author: Serena Willis + * Author: Serena Willis * Copyright (C) 1998 MUG Deutschland - * Copyright (C) 2020 Coherent Logic Development LLC + * Copyright (C) 2020, 2025 Coherent Logic Development LLC * * * This file is part of FreeM. @@ -35,11 +23,35 @@ * You should have received a copy of the GNU Affero Public License * along with FreeM. If not, see . * + * $Log: log.h,v $ + * Revision 1.6 2025/04/15 16:49:36 snw + * Make use of logprintf throughout codebase + * + * Revision 1.5 2025/04/15 14:39:06 snw + * Further improvements to logging + * + * Revision 1.4 2025/04/15 02:24:43 snw + * Improve FreeM logging capabilities + * + * Revision 1.3 2025/03/09 19:50:47 snw + * Second phase of REUSE compliance and header reformat + * + * + * SPDX-FileCopyrightText: (C) 2025 Coherent Logic Development LLC + * SPDX-License-Identifier: AGPL-3.0-or-later **/ #if !defined(_LOG_H) # define _LOG_H -extern void m_log (int level, const char *msg); +#define FM_LOG_DEBUG 0 +#define FM_LOG_INFO 1 +#define FM_LOG_WARNING 2 +#define FM_LOG_ERROR 3 +#define FM_LOG_FATAL 4 -#endif \ No newline at end of file +extern void init_log(void); +extern void log_level_to_text(int level, char *buf); +extern void m_log(int level, const char *msg); +extern void logprintf(int level, char *fmt, ...); +#endif