---
title: "Styling console.log"
summary: "Console.log is one of the simplest, and most powerful, tools frontend developers have. Turns out, it's not quite as simple as we thought."
date: 2013-04-02
authors: [zack-bloom]
topics: [Frontend]
canonical: https://product.hubspot.com/blog/styling-consolelog
cover:
  scene: styling-consolelog
  alt: "A plain wooden log, rings on its cut end and a leafy stub on top, sits in a chair at a dressing-room mirror ringed with bulbs; its reflection grows bigger than the log itself, takes a shadow and glows."
---

Console.log is one of the simplest, and most powerful, tools frontend developers have.  Turns out, it's not quite as simple as we thought.  Console messages can be formatted using CSS.  You could, for example, make your error messages larger:

![Browser console: console.error styled font-size:20pt prints “The Splines Failed to Reticulate!” in large red letters.](/assets/blog/styling-consolelog/file-26665047.png)

You could give your log messages a pleasant shadow:

![Browser console: console.log styled with a grey text-shadow prints “Launching nanobot control subsystem...” with a soft shadow.](/assets/blog/styling-consolelog/file-26665411.png)

The styles don't have to apply to the whole message:

![Browser console: console.log with %c just before Loaded prints “System Status: Loaded” with only the word Loaded in bold.](/assets/blog/styling-consolelog/file-26665558.png)

Each %c resets the styles:

![Browser console: a single console.log with a %c before each part prints “Note:” in red, “The security color of the day is” in plain text and “orange” in bold orange.](/assets/blog/styling-consolelog/file-26793817.png)

Add some formailty to your messages:

![Browser console: console.log styled with a cursive font-family prints “There was an error loading the user. Fonts loaded just fine tho.”](/assets/blog/styling-consolelog/file-26796216.png)

Text is boring, use images:

![Browser console: console.log with an image URL in its CSS prints the Backbone.js logo as a large picture.](/assets/blog/styling-consolelog/file-26801060.png)

Include [charts in your console](http://github.com/zackbloom/console.graph) logging:

![Browser console with a chart drawn in the log: hundreds of thin grey bars in a jagged band of peaks and valleys.](/assets/blog/styling-consolelog/file-26798711.png)

Even better, anything you can draw on a canvas, [you can draw in the console](https://github.com/adamschwartz/chrome-console-grapher/blob/master/chrome.console.grapher.js).
