File: glue-log.h

package info (click to toggle)
fauhdlc 20180504-2
  • links: PTS
  • area: main
  • in suites: buster
  • size: 2,956 kB
  • sloc: cpp: 23,188; ansic: 6,077; yacc: 3,764; lex: 763; makefile: 605; sh: 494; xml: 403
file content (40 lines) | stat: -rw-r--r-- 1,211 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
/* $Id$
 *
 * FAUmachine logging facility.
 *
 * Copyright (C) 2005-2009 FAUmachine Team <info@faumachine.org>.
 * This program is free software. You can redistribute it and/or modify it
 * under the terms of the GNU General Public License, either version 2 of
 * the License, or (at your option) any later version. See COPYING.
 */

#ifndef __GLUE_LOG_H_INCLUDED
#define __GLUE_LOG_H_INCLUDED

/*
 * DEBUG:	should only be shown if debugging is enabled
 * INFO:	all information that is useful to the *user*
 * WARNING:	if something is not being simulated correctly, but
 * 		should continue working without problems
 * ERROR:	if something definitely went wrong, but the component
 * 		continues working
 * CRITICAL:	if something went wrong and the component
 * 		is not supposed to continue working correctly
 * FATAL:	if the component does not know what to do
 */

enum fauhdli_log_level {
	FAUHDLI_LOG_FATAL,
	FAUHDLI_LOG_CRITICAL,
	FAUHDLI_LOG_ERROR,
	FAUHDLI_LOG_WARNING,
	FAUHDLI_LOG_INFO,
	FAUHDLI_LOG_DEBUG,
};

extern void
fauhdli_log(enum fauhdli_log_level level,
		const char *type, const char *name, const char *fmt, ...)
	__attribute__ ((format (printf, 4, 5)));

#endif /* __GLUE_LOG_H_INCLUDED */