#include <stdio.h>
#include "common_definitions.h"
Go to the source code of this file.
|
| void | print_debug (FILE *std, const char *color, const char *file, int line, char *va_format,...) |
| |
| void | log_start_args (int argc, char **argv) |
| |
| #define ANSI_COLOR_DEFAULT "\x1b[0;39m" |
Terminal code for the default color
Definition at line 26 of file log.h.
| #define ANSI_COLOR_GRAY "\x1b[0;90m" |
Terminal code for the color gray
Definition at line 22 of file log.h.
| #define ANSI_COLOR_GREEN "\x1b[0;32m" |
Terminal code for the color green
Definition at line 24 of file log.h.
| #define ANSI_COLOR_PURPLE "\x1b[1;35m" |
Terminal code for the purple color
Definition at line 20 of file log.h.
| #define ANSI_COLOR_RED "\x1b[0;31m" |
Terminal code for the color red
Definition at line 30 of file log.h.
| #define ANSI_COLOR_RESET "\x1b[0m" |
Terminal code for resetting the color
Definition at line 32 of file log.h.
| #define ANSI_COLOR_YELLOW "\x1b[0;33m" |
Terminal code for the color yellow
Definition at line 28 of file log.h.
Uncomment this line to enable detailed debug information
Definition at line 15 of file log.h.
Uncomment this line to write to a to a file instead of stdout
Definition at line 17 of file log.h.
| #define PRINT_DEBUG |
( |
|
... | ) |
|
Value:
__LINE__, __VA_ARGS__)
void print_debug(FILE *std, const char *color, const char *file, int line, char *va_format,...)
Definition at line 37 of file log.h.
Value:
__LINE__, __VA_ARGS__)
void print_debug(FILE *std, const char *color, const char *file, int line, char *va_format,...)
#define ANSI_COLOR_PURPLE
Definition at line 35 of file log.h.
| #define PRINT_ERROR |
( |
|
... | ) |
|
Value:
__LINE__, __VA_ARGS__)
void print_debug(FILE *std, const char *color, const char *file, int line, char *va_format,...)
Definition at line 43 of file log.h.
| #define PRINT_INFO |
( |
|
... | ) |
|
Value:
__LINE__, __VA_ARGS__)
#define ANSI_COLOR_DEFAULT
void print_debug(FILE *std, const char *color, const char *file, int line, char *va_format,...)
Definition at line 39 of file log.h.
| #define PRINT_WARN |
( |
|
... | ) |
|
Value:
__LINE__, __VA_ARGS__)
#define ANSI_COLOR_YELLOW
void print_debug(FILE *std, const char *color, const char *file, int line, char *va_format,...)
Definition at line 41 of file log.h.
| void log_start_args |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Logs the command line arguments the process was started with.
- Parameters
-
| argc | The argc passed to the program/lib. |
| argv | The argv passed to the program/lib. |
Definition at line 219 of file log.c.
| void print_debug |
( |
FILE * |
std, |
|
|
const char * |
color, |
|
|
const char * |
file, |
|
|
int |
line, |
|
|
char * |
va_format, |
|
|
|
... |
|
) |
| |
Prints a debug message, mimicking printf-like function, supports only d, s and c
- Parameters
-
| std | Standard output to use. color Color to print the message in. |
| file | The file the debug message generated in. |
| line | The line number in the file the debug message generated at. |
| message | The debug message to be displayed. |
| ... | Variable number of optional arguments that match with the va_format. |
Definition at line 60 of file log.c.