Annotation of freem/src/log.h, revision 1.6
1.1 snw 1: /*
1.6 ! snw 2: * $Id: log.h,v 1.5 2025/04/15 14:39:06 snw Exp $
1.3 snw 3: * freem error logging
1.1 snw 4: *
5: *
1.2 snw 6: * Author: Serena Willis <snw@coherent-logic.com>
1.1 snw 7: * Copyright (C) 1998 MUG Deutschland
1.3 snw 8: * Copyright (C) 2020, 2025 Coherent Logic Development LLC
1.1 snw 9: *
10: *
11: * This file is part of FreeM.
12: *
13: * FreeM is free software: you can redistribute it and/or modify
14: * it under the terms of the GNU Affero Public License as published by
15: * the Free Software Foundation, either version 3 of the License, or
16: * (at your option) any later version.
17: *
18: * FreeM is distributed in the hope that it will be useful,
19: * but WITHOUT ANY WARRANTY; without even the implied warranty of
20: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21: * GNU Affero Public License for more details.
22: *
23: * You should have received a copy of the GNU Affero Public License
24: * along with FreeM. If not, see <https://www.gnu.org/licenses/>.
25: *
1.4 snw 26: * $Log: log.h,v $
1.6 ! snw 27: * Revision 1.5 2025/04/15 14:39:06 snw
! 28: * Further improvements to logging
! 29: *
1.5 snw 30: * Revision 1.4 2025/04/15 02:24:43 snw
31: * Improve FreeM logging capabilities
32: *
1.4 snw 33: * Revision 1.3 2025/03/09 19:50:47 snw
34: * Second phase of REUSE compliance and header reformat
35: *
1.3 snw 36: *
37: * SPDX-FileCopyrightText: (C) 2025 Coherent Logic Development LLC
38: * SPDX-License-Identifier: AGPL-3.0-or-later
1.1 snw 39: **/
40:
41: #if !defined(_LOG_H)
42: # define _LOG_H
43:
1.6 ! snw 44: #define FM_LOG_DEBUG 0
! 45: #define FM_LOG_INFO 1
! 46: #define FM_LOG_WARNING 2
! 47: #define FM_LOG_ERROR 3
! 48: #define FM_LOG_FATAL 4
1.5 snw 49:
50: extern void init_log(void);
51: extern void log_level_to_text(int level, char *buf);
52: extern void m_log(int level, const char *msg);
1.4 snw 53: extern void logprintf(int level, char *fmt, ...);
1.3 snw 54: #endif
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>