# 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*

<table><thead><tr><th width="221"></th><th></th></tr></thead><tbody><tr><td><strong>name</strong></td><td>the name of the given function to log</td></tr><tr><td><strong>severity</strong></td><td>"INFORMATION", "WARNING", "ERROR", "FATAL"</td></tr><tr><td><strong>message</strong></td><td>the given message such as an error message</td></tr><tr><td><strong>sendMail</strong></td><td>whether we should send an email to the administrator</td></tr></tbody></table>
