aboutsummaryrefslogtreecommitdiff
path: root/mg2d.h
diff options
context:
space:
mode:
Diffstat (limited to 'mg2d.h')
-rw-r--r--mg2d.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/mg2d.h b/mg2d.h
index 834e717..a587a18 100644
--- a/mg2d.h
+++ b/mg2d.h
@@ -168,7 +168,9 @@ typedef struct MG2DContext {
/**
* A callback that will be used to print diagnostic messages.
*
- * Defaults to fprintf(stderr, ...)
+ * The default implementation prints to stderr.
+ *
+ * May be set to NULL to disable logging.
*/
void (*log_callback)(const struct MG2DContext *ctx, int level,
const char *fmt, va_list);
@@ -272,6 +274,12 @@ typedef struct MG2DContext {
* Time-stepping factor to use for relaxation.
*/
double cfl_factor;
+
+ /**
+ * Maximum level of messages printed by the default logging callback. Has no
+ * effect when log_callback is overridden.
+ */
+ enum MG2DLogLevel log_level;
} MG2DContext;
/**