fswatch  1.14.0
Macros | Functions
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)   fsw_logf("%s: ", __func__); fsw_log(msg)
 Log the specified message to the standard output prepended by the source line number.
 
#define FSW_ELOG(msg)   fsw_flogf(stderr, "%s: ", __func__); fsw_flog(stderr, msg)
 Log the specified message to the standard error prepended by the source line number.
 
#define FSW_LOGF(msg, ...)   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.
 
#define FSW_ELOGF(msg, ...)   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.
 
#define FSW_FLOGF(f, msg, ...)   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.
 

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: GNU General Public License v. 3.0
Author
Enrico M. Crisostomo
Version
1.8.0

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.