logger.cpp File Reference
`#include <stdio.h>`
`#include <stdarg.h>`
`#include <time.h>`
`#include "global.h"`
`#include "logger.h"`

## Functions

void | logger_print_time (_IO_FILE *stream)
| Prints a timestamp. More...
void | logger_error (const char *format,...)
| Outputs the printf like formatted message to stderr and colorizes it. More...
void | logger_reset ()
| Resets the logger to prevent the previous line being overdrawn. More...
void | logger (logger_verbose_t verboselevel, logger_type_t logtype, const char *format,...)
| prints the message to stdout and formats it More...
void | logger (logger_verbose_t verboselevel, const char *format,...)
| prints the message to stdout More...

## Variables

int | lastlog = 0

## Function Documentation

void logger | ( | logger_verbose_t | verboselevel,
|  | logger_type_t | logtype,
|  | const char * | format,
|  |  | ...
| ) |  |

prints the message to stdout and formats it

Parameters

  verboselevel | minimum verbose level for output
  logtype | type of logmessage for coloring
  format | printf formatted string

void logger | ( | logger_verbose_t | verboselevel,
|  | const char * | format,
|  |  | ...
| ) |  |

prints the message to stdout

Parameters

  verboselevel | minimum verbose level for output
  format | printf formatted string

void logger_error | ( | const char * | format,
|  |  | ...
| ) |  |

Outputs the printf like formatted message to stderr and colorizes it.

Parameters

  format | printf formatted string

void logger_print_time | ( | _IO_FILE * | stream | ) |

Prints a timestamp.

Parameters

  stream | target stream (stdout, stderr)

void logger_reset | ( |  | ) |

Resets the logger to prevent the previous line being overdrawn.

Call after custom printf

## Variable Documentation

int lastlog = 0