Stardew Engine
Loading...
Searching...
No Matches
Log.c File Reference
#include "Log.h"
#include <stdio.h>
#include <string.h>
#include <time.h>
#include "Thread.h"
#include "ANSIColourCodes.h"
#include "main.h"
Include dependency graph for Log.c:

Functions

void Log_SetLevel (enum LogLvl lvl)
 logs with a level lower than this will be dropped
 
int Log_Init ()
 
void Log_DeInit ()
 
int vLog_Fmt (const char *fmt, enum LogLvl lvl, va_list args)
 
int Log_Verbose (const char *fmt,...)
 
int Log_Fmt (const char *fmt, enum LogLvl lvl,...)
 
int Log_Info (const char *fmt,...)
 
int Log_Warning (const char *fmt,...)
 
int Log_Error (const char *fmt,...)
 

Variables

char * gLogLevelNames [LogLvl_NumLevels]
 
char * gColouredLogLevelNames [LogLvl_NumLevels]
 

Function Documentation

◆ Log_DeInit()

void Log_DeInit ( )

◆ Log_Error()

int Log_Error ( const char *  fmt,
  ... 
)

◆ Log_Fmt()

int Log_Fmt ( const char *  fmt,
enum LogLvl  lvl,
  ... 
)

◆ Log_Info()

int Log_Info ( const char *  fmt,
  ... 
)

◆ Log_Init()

int Log_Init ( )

◆ Log_SetLevel()

void Log_SetLevel ( enum LogLvl  lvl)

logs with a level lower than this will be dropped

◆ Log_Verbose()

int Log_Verbose ( const char *  fmt,
  ... 
)

◆ Log_Warning()

int Log_Warning ( const char *  fmt,
  ... 
)

◆ vLog_Fmt()

int vLog_Fmt ( const char *  fmt,
enum LogLvl  lvl,
va_list  args 
)

Variable Documentation

◆ gColouredLogLevelNames

char* gColouredLogLevelNames[LogLvl_NumLevels]
Initial value:
=
{
BHCYN"[Verbose]"CRESET" ",
BHGRN"[Info]"CRESET" ",
BHYEL"[Warning]"CRESET" ",
BHRED"[Error]"CRESET" ",
}
#define BHYEL
Definition ANSIColourCodes.h:71
#define BHGRN
Definition ANSIColourCodes.h:70
#define CRESET
Definition ANSIColourCodes.h:79
#define BHCYN
Definition ANSIColourCodes.h:74
#define BHRED
Definition ANSIColourCodes.h:69

◆ gLogLevelNames

char* gLogLevelNames[LogLvl_NumLevels]
Initial value:
=
{
"[Verbose] ",
"[Info] ",
"[Warning] ",
"[Error] ",
}