Lucee Function Reference
Function WRITELOG
Writes a message to a log file.
Example
writelog(string text,[string type,[boolean application,[string file,[string log]]]]):void
Arguments
The arguments for this function are set. You can not use other arguments except the following ones.
Name | Type | Required | Description |
---|---|---|---|
text | string | Yes | Message text to log. |
type | string | No |
Type (severity) of the message: |
application | boolean | No | log application name, if it is specified in a cfapplication tag. |
file | string | No |
Message file. Specify only the main part of the filename. For example, to log to the Testing.log file, specify "Testing". The file must be located in the default log directory. You cannot specify a directory path. If the file does not exist, it is created automatically, with the suffix .log. |
log | string | No |
If you omit the file argument, writes messages to standard log file. Ignored, if you specify file argument. |