WriteLog

Writes a message to a log file.

WriteLog( text [, type [, application [, file [, log ] ] ] ] )

Returns: void

Argument Description
text
string, required

Message text to log.

type
string, optional

Type (severity) of the message:

  • information (default)
  • warning
  • error
  • fatal
application
boolean, optional

log application name, if it is specified in a cfapplication tag.

file
string, optional

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, optional

If you omit the file argument, writes messages to standard log file. Ignored, if you specify file argument.

  • 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.

Examples

There are currently no examples for this function

See also