Firebug Tip: Styled Logging
by Honza- Published:November 16th, 2012
- Comments:3 Comments
- Category:Firebug, Firebug Tip, Planet Mozilla
Styled logging has been available in Firebug for long time and since version 1.11 beta 2 improves this little nifty feature, let's take a sneak peak at what it does and how it could be useful.
Styled logging allows the user of console.log() API to use custom CSS styles.
How to specify custom CSS
First of all take a look at a simple example:
console.log("%cred text", "color:red");
Where the %c is used as a style format variable. This is how the log appears in the Console panel.
See all Firebug tips