Still from the 1980s TV show Twin Peaks showing actress Catherine E. Coulson as the Log Lady stroking her pet log
Catherine E. Coulson gives console.log a different meaning as the Log Lady in Twin Peaks

If you’re a JavaScript developer you will be familiar with console.log, a function for printing a value to the console. console.log is often used for debugging, and if you’re a great JavaScript developer like me, you mostly use it to determine whether your code is working by printing things like 'asdasdsds' or 'HELLO IS THIS RUNNING?!?!'.

const msg = 'JavaScript is fun';
console.log( msg );
> 'JavaScript is fun'

Even if you write console.log many times a day, you probably haven’t stopped to think about how the words ‘console’ and ‘log’ ended up in a programming language. Isn’t ‘console’ something you do when someone is upset? Isn’t a ‘log’ something you put on a fire?

Let’s take an etymological stroll through history and see what we can find. Our journey will take us from the early days of computing to medieval churches to the high seas, and we’ll learn that the seemingly unrelated definitions of these words have more in common than you might think.


This is a JavaScript debugging console. It displays messages that help a programmer understand what’s happening in the code that’s being executed.

A screenshot of the JavaScript debugging console in Google Chrome showing various logged messages

The JavaScript console in Google Chrome’s developer tools. Messages from console.log (or in the case of the red and yellow messages, console.error and console.warn) appear here

The concept of a debugging console is not unique to JavaScript. It’s a basic software interface common to many programming languages and applications. It provides a way for a program to output low-level textual information and, optionally, receive inputs for controlling the program.

A screenshot of the OSX Console application

The OSX Console application

The definition of console as a software feature comes from the early days of computing, when a user interacted with a computer mainframe (which was often very large and possibly located in another room or building) via an array of controls set in a desk.

A man in a white shirt pressing a button on a 1960's IBM computer console

A meteorologist at the console of the IBM 7090 electronic computer in the Joint Numerical Weather Prediction Unit in 1965. Image credit: Wikimedia Commons

Early computer consoles were controlled by switches and buttons, while output was relayed to the operator via lights, dials, and paper printouts. Over time, consoles evolved to incorporate a command-line interface on a screen, with which the user would enter instructions using a keyboard.

We can find analogs of the computer console by looking to the world of music. Sound mixing consoles have existed in one form or another since the advent of electrical audio recording and broadcast almost a century ago.

But the use of the word console to describe a panel of electrical controls can be traced even further back, beyond the discovery of electricity itself, to the pipe organ.

Interior photograph of a church showing the pipe organ facade below a large stained glass window

The pipe organ facade in the former abbey church in Ebrach, Germany. Image credit: Wikimedia Commons

The pipe organ is the largest musical instrument, and is played by an organist who sits at a complex array of controls called a console. Organ consoles consist of keyboards (typically three to five), pedals, and stops - binary valves used for controlling wind flow to the pipes.

A pipe organ console with console brackets

Image credit: Wikimedia Commons

Organ consoles give us another everyday term: the idiom ‘pulling out all the stops’, meaning to apply maximum effort to a task. When every stop on the console is open an organ will produce sound using every available pipe, and therefore at maximum volume.

Painting of composer and organist César Franck pulling out an organ stop

Composer César Franck pulling out a stop at the console of the organ at St. Clotilde Basilica, Paris, 1885. Image credit: Wikimedia Commons

But where did this type of console get its name? One clue lies in the fact that many organ consoles share a design feature with the console table. Modern console tables are typically four-legged, free-standing structures designed to abut a wall. But if we go back a few centuries, we find that console tables were more commonly wall-mounted with brackets beneath the table surface to bear the load.

Marble and gilt oak console table with decoratively carved supporting brackets

French Regency console table from the Metropolitan Museum of Art collection in New York. Image credit: Wikimedia Commons

These supporting brackets are where the console table, (and perhaps the organ console) gets its name. In architecture, a console refers to an ornamental bracket that supports a protruding structure, such as a ledge, cornice, or balcony.

A neoclassical stone console supporting a balcony

Neoclassical stone console supporting a balcony at the Maison médicale de l'Œuvre du calvaire in Brussels. Image credit: Wikimedia Commons

At this point, our etymological path forks. An architectural console may get its name from the verb ‘to console’: literally con solaris or ‘with soothing’; a relieving of pain or, perhaps, of weight. You could consider the job of a console to ‘relieve’ the weight of the structure above it.

An alternative explanation takes us back to the church, where in medieval times choir stalls were decorated with carved male figures called consolateurs or ‘consolers’. This in itself may have been a pun on the fact that consolers were often carved into armrests, thus supporting the weight of a seated chorist’s arms.

Illustration of wooden choir stalls showing carved consoles in the arm rests

Illustration showing the carved wooden consolateurs in the armrests of the choir stalls at Andlau Abbey in Alsace, France. Image credit: Wikimedia Commons

So, far from being coincidental homonyms, it turns out that the many definitions of ‘console’ share a common etymological root, even when it’s used as a verb. Does the same go for ‘log’?


In computing, the term ‘log’ derives from a ship’s log, which is short for ‘logbook’. A logbook is used for recording information about any event taking place aboard a vessel, from navigation to maintenance to changes in crew. While there are typically no restrictions about what can be recorded in a logbook, the name comes from a very specific use: recording the ship’s speed.

Long before the invention of modern instruments, such as GPS, recording speed was an essential part of navigating the seas. Sailors would measure their speed and record it in the logbook every half hour, and by knowing how fast they were going, combined with the direction in which they were traveling (measured using a compass), they could work out where they were on the map.

Ships logbook showing handwritten entries

Logbook from the USS Savannah with entries from September 3-15, 1943. Image credit: Wikimedia Commons

The logbook got its name from the chip log, a device that sailors used to measure the ship’s speed. This consisted of a quarter-circle piece of wood (the ‘chip’) with a rope tied to it, in which knots were tied at regular intervals.

Chip log

19th century chip log. Image credit: Wikimedia Commons

A sailor would throw the chip overboard and count how many knots spooled out while another sailor timed him using a sand timer. When the timer was up, the number of knots that had passed over the stern could be used to calculate the ship’s speed, which was then recorded in the logbook. This is where we get the term ‘knot’ as shorthand for 1 nautical mile per hour.

An engraving of three mates measuring a ship’s speed using a chip log

Before the invention of the chip log, an even more rudimentary technique for gauging speed was the Dutchman’s log. One sailor would throw any floating object (probably an actual log) over the bow of the ship while another sailor on the stern timed how long it took for the object to pass him. With this measurement (and knowing the length of the ship), the sailors could make a rough estimate of how fast they were travelling.

The days of using a log to measure a ship’s speed lie centuries behind us, but ‘log’ is a ubiquitous term in modern life thanks to its importance in computing (just think how many times you ‘log in’ to various pieces of software every day). And it’s just one of many modern definitions whose origins lie in our civilization’s long maritime history. We don’t need to look far to find more: the word ‘cyber’ derives from the ancient Greek word kubernētēs, meaning steersman or rudder, and the word ‘gadget’ was a slang term used by sailors for any part of a ship that they couldn’t remember the correct name of.

So next time you write console.log in your editor, spare a thought for the computer pioneers, pipe organists, medieval carvers, and old-word mariners who played a small part in giving us the very modern definitions of these two words.

If you enjoyed this, you may want to read Your creations will not outlast you.