changeset 285:c43e39745cd8

doc: add note about console logs
author David Demelier <markand@malikania.fr>
date Mon, 21 Dec 2020 09:50:16 +0100
parents 9ba73b0ca347
children 3991779aaba9
files doc/docs/dev/error.md
diffstat 1 files changed, 9 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/doc/docs/dev/error.md	Sun Dec 20 15:32:17 2020 +0100
+++ b/doc/docs/dev/error.md	Mon Dec 21 09:50:16 2020 +0100
@@ -11,6 +11,12 @@
 2. Recoverable error at runtime.
 3. Unexpected error at runtime.
 
+## About logs
+
+By itself, the core API never write anything to stdout/stderr. Instead it uses
+the [trace][] and [panic][] functions which by default can write to the console,
+if this is undesired, you can replace both handlers to use your custom logs.
+
 ## Kind of errors
 
 ### Assertions
@@ -70,3 +76,6 @@
 | libmlk-core | Programming errors | As much as possible | Only in memory utilities from util.h      | Never called from libcore itself. |
 | libmlk-ui   | Programming errors | When applicable     | Mostly in rendering errors                | None.                             |
 | libmlk-rpg  | Programming errors | When applicable     | Mostly in rendering errors                | None.                             |
+
+[panic]: api/core/panic.md
+[trace]: api/core/trace.md