Console


How to use the Console class of the bit Butil?

Usage
To use the browser console features you need to inject the Bit.Butil.Console class and use it like this:
@inject Bit.Butil.Console console

@code {
    console.Log("This is a test log:", value);
    console.Error("This is a test error:", value);
    console.Assert(condition, "The condition failed!", value);
}
Methods

Assert:
Log a message and stack trace to console if the first argument is false (MDN).



Count:
Log the number of times this line has been called with the given label (MDN).



CountReset:
Resets the value of the counter with the given label (MDN).



Debug:
Outputs a message to the console with the log level debug (MDN).



Dir:
Displays an interactive listing of the properties of a specified JavaScript object (MDN).



Dirxml:
Displays an XML/HTML Element representation of the specified object if possible or the JavaScript Object view if it is not possible (MDN).



Error:
Outputs an error message. You may use string substitution and additional arguments with this method (MDN).



Group:
Creates a new inline group, indenting all following output by another level. To move back out a level, call console.groupEnd() (MDN).



GroupCollapsed:
Creates a new inline group, indenting all following output by another level. However, unlike console.group() this starts with the inline group collapsed requiring the use of a disclosure button to expand it. To move back out a level, call console.groupEnd() (MDN).



GroupEnd:
Exits the current inline group (MDN).



Info:
Informative logging of information. You may use string substitution and additional arguments with this method (MDN).



Log:
For general output of logging information. You may use string substitution and additional arguments with this method (MDN).



Warn:
Outputs a warning message (MDN).



Table:
Displays tabular data as a table (MDN).



Profile:
Starts the browser's built-in profiler (for example, the Firefox performance tool). You can specify an optional name for the profile (MDN).



ProfileEnd:
Stops the profiler. You can see the resulting profile in the browser's performance tool (for example, the Firefox performance tool) (MDN).



Time:
Starts a timer with a name specified as an input parameter. Up to 10,000 simultaneous timers can run on a given page (MDN).



TimeLog:
Logs the value of the specified timer to the console (MDN).



TimeEnd:
Stops the specified timer and logs the elapsed time in milliseconds since it started (MDN).



TimeStamp:
Adds a marker to the browser performance tool's timeline (MDN).



Trace:
Outputs a stack trace (MDN).



Clear:
Clear the console (MDN).