loading...

A log of errors

n_develop profile image Lars Richter ・2 min read

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?

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?

Posted on by:

n_develop profile

Lars Richter

@n_develop

I'm a father, husband, developer, .NET-fan, blogger and tea-driven developer.

Discussion

markdown guide