diff --git a/website/guide/duktapebuiltins.html b/website/guide/duktapebuiltins.html index 4e98d8cb..ba1a7413 100644 --- a/website/guide/duktapebuiltins.html +++ b/website/guide/duktapebuiltins.html @@ -61,6 +61,7 @@ does not block.
Property | Description | +
---|---|
prototype | Prototype for Logger objects. |
clog | Representative logger for log entries written from C code. |
Called as a constructor, creates a new Logger object with a specified name
+(first argument). If the name is omitted, Logger will automatically assign
+a name based on the calling function's fileName
.
+If called as a normal function, throws a TypeError
.
Logger instances have the following properties:
+n
: logger name; the property will be missing if (a) the given
+ name is not a string, or (b) no name is given and the automatic assignment
+ fails. The logger will then inherit a value from the Logger prototype.
+ You can manually set this property later to whatever value is desired.l
: log level, indicates the minimum log level to output.
+ This property is not assigned by default and the logger inherits a default
+ level from the Logger prototype. You can manually set this property to
+ another value to control log level on a per-logger basis.To write log entries:
++logger.info('three values:', val1, val2, val3); ++ +
For now, see the +internal documentation +on logging for more info.
+ +Property | Description | +
---|---|
raw | Output a formatted log line, by default writes to stderr . |
fmt | Format a single (object) argument. |
trace | Write a trace level (level 0, TRC) log entry. |
debug | Write a debug level (level 1, DBG) log entry. |
info | Write an info level (level 2, INF) log entry. |
warn | Write a warn level (level 3, WRN) log entry. |
error | Write an error level (level 4, ERR) log entry. |
fatal | Write a fatal level (level 5, FTL) log entry. |
l | Default log level, initial value is 2 (info). |
n | Default logger name, initial value is "anon". |