File:  [Coherent Logic Development] / freem / src / log.h
Revision 1.6: download - view: text, annotated - select for diffs
Tue Apr 15 16:49:36 2025 UTC (7 weeks, 4 days ago) by snw
Branches: MAIN
CVS tags: HEAD
Make use of logprintf throughout codebase

/*
 *   $Id: log.h,v 1.6 2025/04/15 16:49:36 snw Exp $
 *    freem error logging
 *
 *  
 *   Author: Serena Willis <snw@coherent-logic.com>
 *    Copyright (C) 1998 MUG Deutschland
 *    Copyright (C) 2020, 2025 Coherent Logic Development LLC
 *
 *
 *   This file is part of FreeM.
 *
 *   FreeM is free software: you can redistribute it and/or modify
 *   it under the terms of the GNU Affero Public License as published by
 *   the Free Software Foundation, either version 3 of the License, or
 *   (at your option) any later version.
 *
 *   FreeM 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 Affero Public License for more details.
 *
 *   You should have received a copy of the GNU Affero Public License
 *   along with FreeM.  If not, see <https://www.gnu.org/licenses/>.
 *
 *   $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

#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

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

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>