-
Notifications
You must be signed in to change notification settings - Fork 10
Console.Log
boxgaming edited this page Sep 25, 2023
·
2 revisions
Logs a message to the console.
When the program is run from the IDE the message will show in the Console output tab. Otherwise, the message will be logged to the browser's console output. The log level and current program source line will prefix the written log message.
Console.Log msg$[, logLevel$]
- The msg$ parameter contains the text which will be written to the console.
- The optional logLevel$ parameter specifies the log level to use. If the specified log level severity is equal to or greater than the current log level the message will be written to the console. If not specified, this parameter defaults to INFO.
Example1: Write a log message to the console
Import Console From "lib/web/console.bas"
Console.LogLevel Console.DEBUG
Console.Log "This is an info message."
Console.Log "This is a trace message, it will be ignored.", Console.TRACE