fswatch 1.20.1
Loading...
Searching...
No Matches
libfswatch_log.h File Reference

Header of the libfswatch library containing logging functions.. More...

#include <stdio.h>

Go to the source code of this file.

Macros

#define FSW_LOG(msg)
 Log the specified message to the standard output prepended by the source line number.
#define FSW_ELOG(msg)
 Log the specified message to the standard error prepended by the source line number.
#define FSW_LOGF(msg, ...)
 Log the specified printf()-like message to the standard output prepended by the source line number.
#define FSW_ELOGF(msg, ...)
 Log the specified printf()-like message to the standard error prepended by the source line number.
#define FSW_FLOGF(f, msg, ...)
 Log the specified printf()-like message to the specified file descriptor prepended by the source line number.

Functions

void fsw_log (const char *msg)
void fsw_flog (FILE *f, const char *msg)
void fsw_logf (const char *format,...)
void fsw_flogf (FILE *f, const char *format,...)
void fsw_log_perror (const char *msg)
void fsw_logf_perror (const char *format,...)

Detailed Description

Header of the libfswatch library containing logging functions..

License:\n GNU General Public License v. 3.0
Author
Enrico M. Crisostomo
Version
1.8.0

Macro Definition Documentation

◆ FSW_ELOG

#define FSW_ELOG ( msg)
Value:
fsw_flogf(stderr, "%s: ", __func__); fsw_flog(stderr, msg)

Log the specified message to the standard error prepended by the source line number.

◆ FSW_ELOGF

#define FSW_ELOGF ( msg,
... )
Value:
fsw_flogf(stderr, "%s: ", __func__); fsw_flogf(stderr, msg, __VA_ARGS__)

Log the specified printf()-like message to the standard error prepended by the source line number.

◆ FSW_FLOGF

#define FSW_FLOGF ( f,
msg,
... )
Value:
fsw_flogf(f, "%s: ", __func__); fsw_flogf(f, msg, __VA_ARGS__)

Log the specified printf()-like message to the specified file descriptor prepended by the source line number.

◆ FSW_LOG

#define FSW_LOG ( msg)
Value:
fsw_logf("%s: ", __func__); fsw_log(msg)

Log the specified message to the standard output prepended by the source line number.

◆ FSW_LOGF

#define FSW_LOGF ( msg,
... )
Value:
fsw_logf("%s: ", __func__); fsw_logf(msg, __VA_ARGS__)

Log the specified printf()-like message to the standard output prepended by the source line number.

Function Documentation

◆ fsw_flog()

void fsw_flog ( FILE * f,
const char * msg )

Prints the specified message to the specified file.

◆ fsw_flogf()

void fsw_flogf ( FILE * f,
const char * format,
... )

Formats the specified message and prints it to the specified file. The message string format conforms with printf.

◆ fsw_log()

void fsw_log ( const char * msg)

Prints the specified message to standard output.

◆ fsw_log_perror()

void fsw_log_perror ( const char * msg)

Prints the specified message using perror.

◆ fsw_logf()

void fsw_logf ( const char * format,
... )

Formats the specified message and prints it to standard output. The message string format conforms with printf.

◆ fsw_logf_perror()

void fsw_logf_perror ( const char * format,
... )

Prints the specified message using perror. The message string format conforms with printf.