mirror of
https://github.com/boxgaming/qbjs.git
synced 2024-05-12 08:00:12 +00:00
Page:
Console.Log
Pages
Adding Support for a New Keyword
Console.Echo
Console.Log
Console.LogLevel
Dom.Add
Dom.Alert
Dom.Confirm
Dom.Container
Dom.Create
Dom.Event
Dom.Get
Dom.GetImage
Dom.Prompt
Dom.Remove
Export
FS.DownloadFile
FS.ListDirectory
FS.UploadFile
G2D.Bezier
G2D.Curve
G2D.Ellipse
G2D.FillCircle
G2D.FillEllipse
G2D.FillRoundRect
G2D.FillTriangle
G2D.InvertRect
G2D.LineCap
G2D.LineDash
G2D.LineDashOff
G2D.LineWidth
G2D.RotoZoom
G2D.RoundRect
G2D.SaveImage
G2D.Shadow
G2D.ShadowOff
G2D.Triangle
Home
Import
QBasic Language Support
Roadmap
Samples
Storage.Clear
Storage.Get
Storage.Key
Storage.Length
Storage.Remove
Storage.Set
Supported Keywords
Unsupported Keywords
2
Console.Log
boxgaming edited this page 2023-09-25 13:40:54 -05:00
Table of Contents
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.
Syntax
Console.Log msg$[, logLevel$]
Parameters
- 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.
Examples
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