⚙ī¸logWrite()

Global function logWrite()

Almost everything in saaster is logged. With this function you can also log your own applications.

The word combination logWirte may sound illogical at first; it would be better to use the name writeLog. The problem is, however, that the word combination writeLog is used directly by Lucee, which is why we simply wrote logWrite.

The function creates a text file in the folder "logs", separated with further folders, which are provided with the date (yyyy-mm). Within the respective folder, the text file is again named with today's date (day). There is a new text file for each day.

Example 1: /logs/2022-12/05.log Example 2: /logs/2023-02/13.log

name

the name of the given function to log

severity

"INFORMATION", "WARNING", "ERROR", "FATAL"

message

the given message such as an error message

sendMail

whether we should send an email to the administrator

Last updated