project_files/frontlib/util/logging.h
author Medo <smaxein@googlemail.com>
Mon, 11 Jun 2012 00:02:17 +0200
changeset 7182 076aba32abd3
parent 7179 f84805e6df03
child 7224 5143861c83bd
permissions -rw-r--r--
Small improvements to the frontend lib for better debugging
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
7155
273ad375d64e Started work on the frontend networking library
Medo <smaxein@googlemail.com>
parents:
diff changeset
     1
#ifndef LOGGING_H_
273ad375d64e Started work on the frontend networking library
Medo <smaxein@googlemail.com>
parents:
diff changeset
     2
#define LOGGING_H_
273ad375d64e Started work on the frontend networking library
Medo <smaxein@googlemail.com>
parents:
diff changeset
     3
273ad375d64e Started work on the frontend networking library
Medo <smaxein@googlemail.com>
parents:
diff changeset
     4
#include<stdint.h>
7182
076aba32abd3 Small improvements to the frontend lib for better debugging
Medo <smaxein@googlemail.com>
parents: 7179
diff changeset
     5
#include <stdio.h>
076aba32abd3 Small improvements to the frontend lib for better debugging
Medo <smaxein@googlemail.com>
parents: 7179
diff changeset
     6
076aba32abd3 Small improvements to the frontend lib for better debugging
Medo <smaxein@googlemail.com>
parents: 7179
diff changeset
     7
#define FLIB_LOGLEVEL_ALL -100
076aba32abd3 Small improvements to the frontend lib for better debugging
Medo <smaxein@googlemail.com>
parents: 7179
diff changeset
     8
#define FLIB_LOGLEVEL_DEBUG -1
076aba32abd3 Small improvements to the frontend lib for better debugging
Medo <smaxein@googlemail.com>
parents: 7179
diff changeset
     9
#define FLIB_LOGLEVEL_INFO 0
076aba32abd3 Small improvements to the frontend lib for better debugging
Medo <smaxein@googlemail.com>
parents: 7179
diff changeset
    10
#define FLIB_LOGLEVEL_WARNING 1
076aba32abd3 Small improvements to the frontend lib for better debugging
Medo <smaxein@googlemail.com>
parents: 7179
diff changeset
    11
#define FLIB_LOGLEVEL_ERROR 2
076aba32abd3 Small improvements to the frontend lib for better debugging
Medo <smaxein@googlemail.com>
parents: 7179
diff changeset
    12
#define FLIB_LOGLEVEL_NONE 100
7155
273ad375d64e Started work on the frontend networking library
Medo <smaxein@googlemail.com>
parents:
diff changeset
    13
273ad375d64e Started work on the frontend networking library
Medo <smaxein@googlemail.com>
parents:
diff changeset
    14
char* flib_format_ip(uint32_t numip);
273ad375d64e Started work on the frontend networking library
Medo <smaxein@googlemail.com>
parents:
diff changeset
    15
7158
a0573014ff4f Further work on the frontend library, restructuring, ...
Medo <smaxein@googlemail.com>
parents: 7155
diff changeset
    16
void flib_log_e(const char *fmt, ...);
a0573014ff4f Further work on the frontend library, restructuring, ...
Medo <smaxein@googlemail.com>
parents: 7155
diff changeset
    17
void flib_log_w(const char *fmt, ...);
a0573014ff4f Further work on the frontend library, restructuring, ...
Medo <smaxein@googlemail.com>
parents: 7155
diff changeset
    18
void flib_log_i(const char *fmt, ...);
7182
076aba32abd3 Small improvements to the frontend lib for better debugging
Medo <smaxein@googlemail.com>
parents: 7179
diff changeset
    19
void flib_log_d(const char *fmt, ...);
076aba32abd3 Small improvements to the frontend lib for better debugging
Medo <smaxein@googlemail.com>
parents: 7179
diff changeset
    20
076aba32abd3 Small improvements to the frontend lib for better debugging
Medo <smaxein@googlemail.com>
parents: 7179
diff changeset
    21
int flib_log_getLevel();
076aba32abd3 Small improvements to the frontend lib for better debugging
Medo <smaxein@googlemail.com>
parents: 7179
diff changeset
    22
void flib_log_setLevel(int level);
076aba32abd3 Small improvements to the frontend lib for better debugging
Medo <smaxein@googlemail.com>
parents: 7179
diff changeset
    23
void flib_log_setFile(FILE *logfile);
7155
273ad375d64e Started work on the frontend networking library
Medo <smaxein@googlemail.com>
parents:
diff changeset
    24
273ad375d64e Started work on the frontend networking library
Medo <smaxein@googlemail.com>
parents:
diff changeset
    25
#endif /* LOGGING_H_ */