Nudge Physics
A single file, header-only 3D physics library
Loading...
Searching...
No Matches
Log Functions

Log (e.g. printf) function used by the library and exposed to the user. More...

Functions

int nudge::log (const char *format,...)
 Logging function used by the library. It defaults to printf.
 
int nudge::flush (void)
 Flushes the log. It defaults to fflush(NUDGE_LOG_FILE_PTR)
 

Detailed Description

Log (e.g. printf) function used by the library and exposed to the user.

Function Documentation

◆ log()

int nudge::log ( const char *  format,
  ... 
)

Logging function used by the library. It defaults to printf.

Note
User can define NUDGE_LOG_FILE_PTR (default: stdout) to redirect output
User can define NUDGE_VLOG_FUNC(CONST_CHAR_PTR_ARG_PTR , VA_LIST_ARG) (default: vfprintf(NUDGE_LOG_FILE_PTR,CONST_CHAR_PTR_ARG_PTR,VA_LIST_ARG)) to have better control

◆ flush()

int nudge::flush ( void  )

Flushes the log. It defaults to fflush(NUDGE_LOG_FILE_PTR)

Note
When user defines NUDGE_VLOG_FUNC(CONST_CHAR_PTR_ARG_PTR , VA_LIST_ARG), it must define NUDGE_LOG_FLUSH() too