<cflog>

Writes a message to a log file.

Usage

<cflog
    [date=boolean]
    [charset=string]
    [text=string]
    [application=boolean]
    [log=string]
    [exception=any]
    [async=boolean]
    [time=boolean]
    [file=string]
    [type=string]
    [thread=boolean]
>

This tag cannot have a body.

This tag is also supported within cfscript

Attributes

Attribute Description
date
(boolean, optional)

This attribute has been deprecated and is non-functional.

charset
(string, optional)

Character set name for the file contents.

text
(string, optional)

The message to log

application
(boolean, optional)

Specifies whether to log the application name if one has been specified in a cfapplication tag.

log
(string, optional)

Specifies the log to which to write the message. This reference can be defined in the Lucee Administrator. Ignored if you specify a file attribute.

exception
(any, optional)

An exception to log

async
(boolean, optional)

only works in combination with the attribute "file", if set to true the file is written in a separate thread.

time
(boolean, optional)

This attribute has been deprecated and is non-functional.

file
(string, optional)

Define instead a log reference in the Lucee Administrator and use the name of the genrated log with the attribute log. 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.

type
(string, optional)

the following is the log type (level) in decreasing order of severity: - fatal: Severe errors that cause premature termination. - error: Other runtime errors or unexpected conditions. - warn,warning: Use of deprecated APIs, poor use of API, 'almost' errors, other runtime situations that are undesirable or unexpected, but not necessarily "wrong". - info,information (default): Interesting runtime events. - debug: Detailed information on the flow through the system. - trace:Most detailed information.

thread
(boolean, optional)

This attribute has been deprecated and is non-functional.

Examples

There are currently no examples for this tag.