mightymandel v16

GPU-based Mandelbrot set explorer

logging.h File Reference

(v16)

#include <assert.h>
#include <stdio.h>
#include <mpfr.h>
#include "mightymandel.h"
+ Include dependency graph for logging.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define log_message(level,...)   do{ if (level <= log_level) { assert(log_target); if (level <= LOG_DEBUG) fprintf(log_target, "%s", log_prefix[level]); mpfr_fprintf(log_target, __VA_ARGS__); } }while(0)
#define debug_message(...)   log_message(LOG_DEBUG, __VA_ARGS__)

Enumerations

enum  log_level_t {
  LOG_OOPS = 0,
  LOG_FATAL = 1,
  LOG_ERROR = 2,
  LOG_WARN = 3,
  LOG_NOTICE = 4,
  LOG_INFO = 5,
  LOG_DEBUG = 6
}
enum  result_t {
  result_ok = 0,
  result_glitch = 1,
  result_parse = 2,
  result_deep = 3,
  result_timeout = 4
}

Functions

void log_result (const char *filename, enum result_t result, enum render_method_t method, double iterations, double exterior, double interior, double glitch, int passes)

Variables

enum log_level_t log_level
FILE * log_target
const char * log_prefix [7]
const char * result_name [5]

Macro Definition Documentation

#define log_message (   level,
  ... 
)    do{ if (level <= log_level) { assert(log_target); if (level <= LOG_DEBUG) fprintf(log_target, "%s", log_prefix[level]); mpfr_fprintf(log_target, __VA_ARGS__); } }while(0)

Enumeration Type Documentation

Enumerator:
LOG_OOPS 
LOG_FATAL 
LOG_ERROR 
LOG_WARN 
LOG_NOTICE 
LOG_INFO 
LOG_DEBUG 

Definition at line 14 of file logging.h.

enum result_t
Enumerator:
result_ok 
result_glitch 
result_parse 
result_deep 
result_timeout 

Definition at line 42 of file logging.h.

Function Documentation

void log_result ( const char *  filename,
enum result_t  result,
enum render_method_t  method,
double  iterations,
double  exterior,
double  interior,
double  glitch,
int  passes 
)

Definition at line 32 of file logging.c.

References render_method_fp32, render_method_fp64, render_method_fpxx, render_method_name, result_deep, result_glitch, result_name, result_ok, result_parse, and result_timeout.

Referenced by main(), and render_display().

+ Here is the caller graph for this function:

Variable Documentation

enum log_level_t log_level

Definition at line 12 of file logging.c.

Referenced by debug_program(), and main().

const char* log_prefix[7]

Definition at line 14 of file logging.c.

FILE* log_target

Definition at line 13 of file logging.c.

Referenced by debug_program(), and main().

const char* result_name[5]

Definition at line 24 of file logging.c.

Referenced by collect_metadata_to_string(), and log_result().