cflog
Writes a message to a log file.
<cflog text="">
cflog(text="");
Attribute Reference
text string Required
Message text to log.
log string
If you omit the file attribute, writes messages to standard log file. Ignored, if you specify file attribute. Application: writes to Application.log, normally used for application-specific messages. Scheduler: writes to Scheduler.log, normally used to log the execution of scheduled tasks.
Values:
ApplicationScheduler
file string
type string
Type (severity) of the message
Values:
informationwarningerrorfatal
application boolean
log application name, if it is specified in a cfapplication tag.
Compatibility
Lucee:
In Lucee 6.2 or later the default log level is ERROR, so no messages will appear in the logfile unless you have specified type=error or type=fatal. You can change the default as discussed here: https://dev.lucee.org/t/application-log-defaults-to-error-in-6-2/14773
BoxLang:
Version 1.0.0+
<bx:log> in BoxLang Examples Sample code using the cflog tag
CFLog will create a file or append to a file named myAppLog.log in the servers logs directory.
<cflog file="myAppLog" text="Whatever you want to log." type="information" > writeLog(text = "Logging some info.", type = "information", application = "no", file = "myLogFile");
© 2012–present Foundeo, Inc. and the CFDocs contributors.
Licensed under the MIT License.
ColdFusion is a trademark of Adobe Systems Incorporated.
https://cfdocs.org/cflog