Use a Better Tool: Use a Dedicated Log Viewer

Last Update Nov 9, 2021

I think it is safe to say that some developers can be particular about their tools. I remember a job interview where I was asked, “what’s your IDE of choice?”

I said Atom.

“Huh, okay then…”

Even though the interview continued, I’m pretty sure my chances started to slide off the proverbial cliff. I just felt off. Probably because Atom wasn’t really an IDE at the time. So when I got home, I started getting familiar with actual IDE options and learning the differences between them.

In general, I don’t believe liking one IDE or text editor over another is a red flag. With some distance and time in the industry though, I can understand why some people care deeply. Developers put a lot of thought into picking the best tools for their job. In turn, you want your team to use the best tools (hopefully the same tools), and someone going off-script can cause problems. Whether that’s insisting on using Linux over Windows or Atom when the job requires an IDE like Visual Studio, not being on the same page complicates things.

But how much time is spent finding or discussing the preferred log viewer?

Often, not much. In my experience, it was never even a question until working with Loupe. But I think it’s a blind spot for some developers where more thought and having an opinion is beneficial. When you are staring down thousands of lines in a log file, trying desperately to figure out a problem, you will wish you had put some thought into it (or at least that’s what I felt numerous times in the past). Overall, finding the right dedicated log viewer for your project will make you a better-equipped developer with the proper tool to quickly solve challenging problems.

Why use a dedicated log viewer?

You can probably view your logs already. Click on the file, and it automatically opens up in Notepad.

This will seem like a fine process at first. If you are working with a simpler program, it may even be kind of manageable. But it’s the equivalent of watching a film on an airplane over a person’s shoulder. It should be an option for when you have no other options, yet it’s the first tool many use to view a log! If you are running a computer that can connect to the internet, there are other options, and they’re worth investigating.

Let’s start with Notepad ++. It’s a highly customizable text editor that blows Notepad out of the water with its feature set. It can even have some of a dedicated log viewer’s functionality and features with the right plugins. But it struggles to have the same convenience.

It’s not the fault of Notepad ++, but of targeting text editors as the log viewer in general. It’s an issue that caught my eye when testing out live logging options with Serilog. While I didn’t use any text editors for the sake of that article, I did look extensively at the Serilog Expressions Library, a very detailed and powerful text formatting library designed to make reading text files easier. It was more than capable of making readable, detailed logs, even with standard Notepad. After spending some time configuring log outputs, I was impressed with the library and love that it’s an available option.

Yet, it’s not the kind of thing I want to use for every project. I didn’t love dedicating so much application code to formatting logs when the visualization can be done by the log viewer itself instead. It’s great that I can format my logging through the application, but if I have the option to use a log viewer that doesn’t require formatting, why not use it? By letting the log viewer do the heavy lifting, I can simplify my application. In my opinion, a good trade-off.

All of that aside, a dedicated log viewer will generally just have more logging-specific features than a text editor, no matter how pretty you can make them.

A dedicated log viewer will do the job better

Above all else, you want an effective log viewer. Something with features designed to make finding the information you need easy. Let’s compare the features of Notepad, Notepad ++, and a dedicated log viewer.

Feature Notepad Notepad ++ Loupe Desktop
Real-Time Logging No Possible with Modifications Built-in
Search Multiple Log Files No built-in function, try grep or findstr Limited, Find in Files function Built-in Full Text Search with 14 optional filters
Log Organization No No Built-in workflow, view logs per session
Log File Analysis Tools No No Built-in metrics and quality analysis

Notepad does not support any of the features listed. Notepad ++ can partially cover some features and does have a way to find information from multiple logs. But if you have worked with the Find in Files function, you know that it is limited in how you can narrow down the search and may take a decent amount of time to find what you need.

The dedicated log viewer covers all of these features without needing any modifications. You can’t use it to write an application from scratch like a text editor, but that’s not what it’s designed to do. It’s built to make finding and reading logs as easy as possible. And even help you leverage log data in other ways with performance tracking and other analysis features.

So, where do you start?

There’s some research required to find a suitable dedicated log viewer.
Consider these questions as a good starting point to help narrow down the options.

1. What will work with my application?

First, assess which applications you are working on and the programming languages/frameworks they use.
A dedicated log viewer may have a limited amount of languages and frameworks supported. Ultimately, this can result in viewers that are less flexible than text editors. I can view logs from almost any program with Notepad, which is why it’s so ubiquitous. But, the payoff is a tool that can break down the details of your logs in a way that Notepad ++ and regular expressions just can’t.

I recommend narrowing your selection initially by language and logging framework because you shouldn’t port your application to use your preferred log viewer. Suppose I have an application running on .NET using Serilog as the logging framework. In that case, I’m not changing that structure just to use a different log viewer. I’ll use one that works with what I have! Although, when developing a new application from scratch, you could give some thought to the log viewer before making larger language/framework decisions.

So, once you narrow down which log viewers will work for your application, you can consider the other aspects of the software.

2. Do I want log monitoring and analysis features?

Your log files can be useful outside of active troubleshooting. They can be used to trigger notifications through email or messaging applications. Your logs may contain additional information you can use to track application performance metrics over time. These aren’t the first use cases you may think of when you think about log files (I certainly didn’t), but they are the kind of features that make a log viewer useful beyond pure troubleshooting situations. Even if a log isn’t indicating an application defect, long query times or high memory usage could indicate a problem with the application environment that you may not have caught otherwise.

Example metrics graphs from Loupe Desktop Can a text editor aggregate your log data into useful charts or graphs?

3. What is the scope of my application?

Is the application running locally or across many networks across many machines?

The larger the scope of your application, the more you should consider a centralized log management system. One of the reasons I used Notepad early in my career was because it was the default log viewer on our production server, and I wanted to spend as little time there as possible.

If I had a centralized logging system, I wouldn’t have had to spend any time on production to view our logs. Also, I would have had a better log viewer in the process.

Do you just need a local log viewer to start?

When working on a smaller project, a local log viewer may be all you need.

But even when you are working on a larger project, it may be easier to start with a local log viewer. If you are in the early stages of development or are wary of jumping into a full centralized logging system, local logging can be a good place to start. This way, you can learn how to use the tools at your own pace and see if it is something you want to integrate further into projects.

If you are a developer making applications in .NET or Java, you check out Loupe Desktop, our dedicated local log viewer. It’s free, so you can start taking advantage of dedicated logging software for your local projects at any time. You can learn more about it/download it in the link below.

Get Loupe Desktop

Rock solid centralized logging

Unlimited applications, unlimited errors, scalable from solo startup to enterprise.