Lucciefr
Lua code caving, injection and exploration framework
Macros | Functions
logstdio.c File Reference

stdio logging in "text" form (human readable output). More...

#include "logstdio.h"
#include "log.h"
#include "mpkutils.h"
#include "timing.h"

Macros

#define MEMBER(n)   msg->via.array.ptr[n]
 

Functions

void log_text (FILE *stream, msgpack_object *msg)
 output MessagePack object to stream in text format
 
void log_stdio (const char *filename)
 Initialize stdio logging. More...
 

Detailed Description

stdio logging in "text" form (human readable output).

This file implements logging backends that write human-readable output to standard streams, including stdout and stderr. Use log_stdio() to register a new logger.

Function Documentation

void log_stdio ( const char *  filename)

Initialize stdio logging.

This opens the specified log file, and starts writing text log messages to it.

Parameters
filenameThe file name to use. The function recognizes "stdout" and "stderr" and will respect their special meaning. For other names, the corresponding log file will be opened for appending (or a new file created, in case it doesn't exist already).