Duktape 1.x compatible logging framework
Duktape.Logger object and the logging related C API calls
duk_log_va()) were removed in Duktape 2.x because they
depended on stdout/stderr and were thus a portability issue for some targets
(there were also other issues, such as the logging framework not always
matching user expectations). This directory contains Duktape 1.x compatible
Duktape.Logger object and logging API calls:
duk_logging.cto list of C sources to compile.
duk_logging.his in the include path.
Include the extra header in calling code and initialize the bindings:
#include "duktape.h" #include "duk_logging.h" /* After initializing the Duktape heap or when creating a new * thread with a new global environment: */ duk_logging_init(ctx, 0 /*flags*/);
duk_logging.hfor available flags.
After these steps,
Duktape.Loggerwill be registered to the
Duktapeobject and is ready to use.
See https://github.com/svaarala/duktape/blob/master/doc/logging.rst and http://wiki.duktape.org/HowtoLogging.html for more information on the logging framework design and functionality.