Regular API function

simAddLog / sim.addLog

Description Adds a log message that will be output in the console or status bar.
C synopsis simInt simAddLog(const simChar* pluginName,simInt verbosity,const simChar* message)
C parameters
pluginName: the name of the plugin that outputs the message. e.g. MyPlugin with simExtMyPlugin.dll.
verbosity: the verbosity level. Most appropriate values are sim_verbosity_errors (for errors), sim_verbosity_warnings (for warning) and sim_verbosity_infos.
message: the message.
C return value
-1 if operation was not successful.
Lua synopsis sim.addLog(number verbosity,string message)
Lua parameters
verbosity: the verbosity level. Most appropriate values are sim.verbosity_scripterrors (for errors), sim.verbosity_scriptwarnings (for warning) and sim.verbosity_scriptinfos. Combine with sim.verbosity_undecorated if you wish to output the naked message. sim.verbosity_scripterrors will additionaly raise an error.
message: the message. nil clears the status bar.
Lua return values

All regular API functions on one page