Tag <CFLOG>
Writes a message to a log file.
Body
This tag can't have a body.
Example
<cflog [application="boolean"] [charset="string"] [date="boolean"] [file="string"] [log="string"] text="string" [thread="boolean"] [time="boolean"] [type="string"]>
This tag is also supported within cfscript
<cfscript> log [application="boolean"] [charset="string"] [date="boolean"] [file="string"] [log="string"] text="string" [thread="boolean"] [time="boolean"] [type="string"]; </cfscript>
Attributes
The attributes for this tag are fixed. Except for the following attributes no other attributes are allowed.
Name | Type | Required | Description |
---|---|---|---|
application | boolean | No | Specifies whether to log the application name if one has been specified in a cfapplication tag. |
charset | string | No | Character set name for the file contents. |
date | boolean | No | This Attribute is deprecated |
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 attribute, specifies the standard log file in which to write the message. Ignored if you specify a file attribute |
text | string | Yes | The message text to log. |
thread | boolean | No | This Attribute is deprecated |
time | boolean | No | This Attribute is deprecated |
type | string | No | Type (severity) of the message: |