The command log() creates an entry in the email log.
The entry in the email log shows a freely definable text (description) as well as a severity level of the entry. In addition, the message ID of the email header is added to the log entry in angle brackets. The recorded messages can be viewed in the menu Logs.
Structure of the command
log(severity, 'description');
Return value
positive |
always |
Parameters
severity
This parameter specifies the severity of the log entry.
severity |
Meaning |
---|---|
0 |
debug |
1 |
info |
2 |
notice |
3 |
warning |
4 |
error |
5 |
critical |
6 |
alert |
7 |
emergency |
description
Description of how it should be recorded in the email log.
Variables available!
Example 1
Line |
Code |
---|---|
01 |
log(1,'Hello World'); |
Header of the email:
Date: Fri, 05 Aug 2013 11:40:00 +0200
From: sender@vendor.com
To: recipient@customer.com
Subject: Some Topic
Content type: text/plain;
Message ID: <E0D4DE42-DCB5-11D7>
Log recording:
Aug 05 11:40:04 test gateway: <E0D4DE42-DCB5-11D7> Hello World
Explanation
The text Hello World is recorded with the severity info in the email log.