yahelpers
Enhanced debugging functionality for the ya ecosystem
Loading...
Searching...
No Matches
Macros
log.h File Reference

Logging utilities for the ya ecosystem. More...

#include <stdarg.h>
#include <stdio.h>
#include "logconstants.h"
Include dependency graph for log.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define GENERAL_DEBUG   1
 
#define STRINGIFY(x)   #x
 Takes a parameter and convert it to a string.
 
#define TOSTRING(x)   STRINGIFY(x)
 
#define LOG_DEBUG(formatted_string, ...)
 Prints a debug message.
 
#define LOG_FUNCTION_CALL(fn_name)   LOG_DEBUG(#fn_name " was called.\n");
 Prints a function call.
 
#define LOG_FUNCTION_BACK(fn_name)   LOG_DEBUG("Back in " #fn_name "\n");
 Prints a return to a function.
 
#define TYPE_CALL_ADDRESS   0
 Specifies that the given parameter is a pointer.
 
#define TYPE_CALL_VALUE   1
 Specifies that the given parameter is a value.
 
#define TCA   TYPE_CALL_ADDRESS
 Alias for TYPE_CALL_ADDRESS.
 
#define TCV   TYPE_CALL_VALUE
 Alias for TYPE_CALL_VALUE.
 
#define LOG_PARAMETER(ordinal_number, type, type_call, fmt, ...)
 Prints a parameter of a function.
 
#define LOG_RETURN(type, type_call, fmt, ...)
 Prints the value or address that a function will return.
 

Detailed Description

Logging utilities for the ya ecosystem.

Author
asaeppel4231
Version
0.1

This file provides enhanced logging capabilities to support debugging, troubleshooting and the detection of race conditions within the ya ecosystem. It offers lightweight, dependency‑free macros that help track function calls, parameters and return values during development.

Macro Definition Documentation

◆ GENERAL_DEBUG

#define GENERAL_DEBUG   1

◆ STRINGIFY

#define STRINGIFY (   x)    #x

Takes a parameter and convert it to a string.

◆ TOSTRING

#define TOSTRING (   x)    STRINGIFY(x)