Soil Testing 0.1.0
Readily available soil testing
Loading...
Searching...
No Matches
log.h File Reference
#include <stdbool.h>
#include <stdio.h>

Go to the source code of this file.

Functions

uint8_t init_log (void)
 
void dlog_wrap (const char *fmt,...) __attribute__((format(printf
 
void void dlog (const char *msg)
 
void log_file (FILE *f, const char *data)
 
uint8_t close_log (void)
 

Detailed Description

This is the logging system. It is required to keep track of any code failure. This is not a typical debug system. This will log not only debug code, but also write to a file for system validations. I.E. whether or not solutions are running low or needing repair or replacement.

Function Documentation

◆ close_log()

uint8_t close_log ( void )

shut down the logging system

◆ dlog()

void void dlog ( const char * msg)

Will be U[S]ART logging system for debugging. For now it is using stdio.

Parameters
constchar **msg The string to be logged.

◆ dlog_wrap()

void dlog_wrap ( const char * fmt,
... )

custom print-style wrapper for dlog.

◆ init_log()

uint8_t init_log ( void )

init_log

Initalize the logging system. This will look for a file based on DATETIME to ensure that the system does not overwrite data, allowing for checks whenever desired, so long as there is enough memory.

◆ log_file()

void log_file ( FILE * f,
const char * data )

Write data to a file.

Parameters
FILE*f The file to write to. This will be picked up by the system as long as there is still room in memory.
constchar **data This is the data to saved.