log |
Type | command |
Dictionary | LCS |
Library | LiveCode Script |
Syntax | log [ <argumentList> ]
|
Summary | Invokes the logMessage if it is not empty.
|
Introduced | 9.5 |
OS | mac, windows, linux, ios, android, web |
Platforms | desktop, server, mobile |
Parameters | Name | Type | Description |
---|
argumentList | | A comma separated list of expressions containing the arguments to send.
Arrays are expressions and are valid to send as arguments.
|
|
Example | on preOpenStack
if the uBuildMode of this stack is "release" then
set the logMessage to empty
end if
loadResources
end preOpenStack
command loadResources
log "loading resources"
end loadResources
on log pInfo
put pInfo
end log
|
Related | Command: put
Message: msgChanged
Property: logMessage
|
Description | The log command invokes the handler specified by the logMessage property.
When the logMessage is the default value of log then the log command
behaves in the same way as any other scripted handler. If the logMessage is
set to empty then the log command does not invoke any handler or evaluate
parameters, therefore, allowing for many logs to be added to scripts for
development and an easy low-cost method to turn the logging off for a release
build. The logMessage may be set to any handler name, however, if the
handler is not in the message path then use of the log command will throw a
can't find handler error.
|
Tags | debugging |