- log.getFilename()
- log.add()
- log.addRaw()
- log.isOpen()
- log.setLevel()
- log.emergency()
- log.alert()
- log.critical()
- log.error()
- log.warning()
- log.notice()
- log.info()
- log.debug()
Returns the filename (including full path) of the file we are logging to.
Adds 'msg' into our log file. This includes timestamp prefix, and a trailing newline (\n).
@code() log.add("Testing");-- Adds the following (with correct date-time) to your log file: 2018-09-17 18:01:55 : Testing @endcodeAdds 'msg' into our log file. This differs from log.add() as it does not include the timestamp.
If a log was successfully opened for writing, returns
Sets the minimum "level" that a message must be in order to be logged by the system. Log levels follow RFC-5425.
@code() log.setLevel(log.level.notice); log.warning("This is a warning! It will be logged."); log.notice("This is a boring notice. It will also be logged."); log.notice("This is a debug message. It will be ignored, because it does not reach the set log level."); @endcode
| Log level | Int value |
|---|---|
| 0 | |
| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | |
| 7 |
Emergency messages will always be logged and cannot be ignored. By default, the log level is typically be
Log an emergency-level message.
@code() log.emergency("Emergency message goes here"); @endcodeLog an alert-level message.
@code() log.alert("Alert message goes here"); @endcodeLog an critical-level message.
@code() log.critical("Critical message goes here"); @endcodeLog an error-level message.
@code() log.error("Error message goes here"); @endcodeLog an warning-level message.
@code() log.warning("Warning message goes here"); @endcodeLog an notice-level message.
@code() log.notice("Notice message goes here"); @endcodeLog an info-level message.
@code() log.info("Info message goes here"); @endcodeLog an debug-level message.
@code() log.debug("Debug message goes here"); @endcodePage last updated at 2024-03-27 00:14:11