Module log
Logging
This module can also be called like a method, it takes 2 arguments, the log level and the log string, and log them to the log target.
See dbus, evdev, event, file, hwinfo, log, lua, misc, os, spawn, udev, xorg for more information about this type
Properties
Log level |
|
Log target |
- log_level: string
- Type:
string
Log level
Read/write property for log level. Possible values are: “error”, “warn”, “info”, “debug”
- log_target: object
- Type:
object
Log target
Write only property used to set the log target. Any object with a
write(string)method could work. This module providesfile_target()andstderr_target()for creating log targets that log to a file and stderr respectively.
Methods
Log target for file |
|
Log target for stderr |
- file_target(filename, overwrite) FileTarget
- Return type:
- Parameters:
filename (string)
overwrite (bool)
Log target for file
Create a log target that writes to a file.
- stderr_target() StderrTarget
- Return type:
Log target for stderr
Create a log target that writes to stderr.