Documentation for MultiLineLog
In order to use MultiLineLog, you must first load the plugin at the top of your script
using the LoadPlugin method like this:
app.LoadPlugin( "MultiLineLog" );
Then you can create an instance of the plugin object when you need it like this:
plg = app.CreateObject( "MultiLineLog" );
To use this example copy all to a script and run from there.
Example - Print to debug console with colors
app.LoadPlugin( "MultiLineLog" );
plg = app.CreateObject( "MultiLineLog" );
const longTxt = "“A man is smoking a cigarette and blowing smoke rings into the air. His girlfriend becomes irritated with the smoke and says, “Can’t you see the warning on the cigarette pack? Smoking is hazardous to your health!” To which the man replies, “I am a programmer. We don’t worry about warnings; we only worry about errors.”";
console.log( longTxt );
plg.log( longTxt );
function OnStart()
{
plg.log( longTxt );
myFunctionName();
}
function myFunctionName()
{
plg.log( longTxt, "red" );
differentFunctionName();
}
function differentFunctionName()
{
plg.log( longTxt, "blue" );
completelyOtherFunction();
}
function completelyOtherFunction()
{
plg.log( longTxt, "green" );
}
Wheelie.Tips