DEV Community

Lars Richter
Lars Richter

Posted on

A log of errors

Let me start with a confession. I really love the dev.to community. There are not a lot of developer communities, that are so kind and friendly.

But why this tribute to the community? Because it was a community member who told me about the idea, that I will write about. It was Joseph Jude who commented on the article Take Notes on Everything by Max Antonucci. Joseph commented, that he keeps a log of every error (and the corresponding solution) he gets while developing. What a great idea!

It's a shame, how often I have to google the same error message or bug, that I googled a couple of months ago. The idea of an "error log" is just awesome.

Format

I use markdown. Why? Because I love markdown. It is a simple and powerful markup language. It's easy to insert code snippets, images, links and much more.

And if you use a good editor, like MarkdownMonster or VS Code , it's even more fun.

Markdown Template

I created myself a little template for every error I log. It consists of

  • a title
  • a few tags (to make it better searchable)
  • a description of the problem
  • a description of the reason/cause of the error
  • and of course the solution to it.

It looks like this:

## Title (for example an error message)

**Tags**:

> these, are, my, tags, for, the, search

### Problem

A short description of the problem/bug/error. 
In most cases it contains the situation 
in which the error occurs 
and the error including the stacktrace.

### Reason

Why did the error happen?

### Solution

What's the solution for this problem?

Enter fullscreen mode Exit fullscreen mode

Where to keep it

I wanted to have this error log accessible from almost everywhere. That's why I use GitHub.

GitHub also provides a pretty good search functionality. That helps a lot.

Of course you can just use a simple directory structure on your disk and sync it to your Dropbox, or something like that. But for me, GitHub was an excellent choice.

Summary

I said it before and I will say it again: all credit goes to Joseph Jude. I learned that from his great comment.

Please let me know what you think. Do you already keep an "error log" or maybe something similar?

Oldest comments (0)