Features of a Good Log File Viewer
Tags: devops, programming, coding
Published: 2019-07-15 20:20:40



<!-- wp:paragraph -->
<p>When you think of a log file viewer, what do you think of? Come on, be honest.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p> <a href="https://vim.sourceforge.io/">Vim</a> or <a href="https://www.gnu.org/software/emacs/">Emacs</a>? &nbsp;<a href="https://notepad-plus-plus.org/">Notepad++</a> or <a href="https://www.sublimetext.com/">Sublime</a>? Do you just invoke "tail" from the command line? </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Please say you're not just using Notepad in Windows. No judgment, but if you're going that route, you're putting yourself through a lot of unneeded pain.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>In this article, we're going to take a look in a little more detail at what a log file viewer really is today, in 2019.  And then we're going to look at the features that good log file viewers have and that you should look for.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2>A Log File Viewer is More Than Just a Text Editor</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>I asked about the aforementioned tools<strong>—</strong>text editors<strong>—</strong>because that's how we conceive of a log file viewer. Logs are text files. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>So when we go to view them, we use a tool meant for viewing (and editing) text. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>This is completely understandable, and it's also served us well as an industry since some programmer half a century ago first had the idea to output runtime information to a file.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Or, at least, it has sufficed. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Viewing log files with a text editor supplies us with the basics for troubleshooting. We can look at the information contained in the file and we can do text search, with varying degrees of sophistication. And, if necessary, we can copy and make modifications to the text.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>But surviving isn't thriving. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>When it comes to employing <a href="https://www.scalyr.com/help/view">a log file viewer,</a>&nbsp;we can ask for so much more. This really shouldn't surprise in the year 2017. <a href="https://techcrunch.com/2016/06/07/software-is-eating-the-world-5-years-later/"><g class="gr_ gr_6 gr-alert gr_gramm gr_inline_cards gr_run_anim Grammar only-ins replaceWithoutSep" id="6" data-gr-id="6">Software</g> is "eating the world"</a> and the DevOps movement has brought us an explosion of SaaS and tools to help software shops. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Should it really surprise anyone that the modern log file viewer can do some awesome stuff?</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Let's take a look at some of what you should expect when picking a tool to help you view your logs. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>What are features of a good log file viewer in this day and age?</p>
<!-- /wp:paragraph -->

<!-- wp:image {"id":3538} -->
<figure class="wp-block-image"><img src="https://library.scalyr.com/2019/03/29102608/log-file-viewer-1024x471.png" alt="" class="wp-image-3538"/></figure>
<!-- /wp:image -->

<!-- wp:more -->
<!--more-->
<!-- /wp:more -->

<!-- wp:heading -->
<h2>1. A Log File Viewer Should Scale Well for Viewing</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Remember how I asked about Notepad, and how I talked about the pain it brings you? </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>It's nothing against the tool; Notepad is great as, well, a notepad. You open it up quickly, make a few text notes for later, and close it.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>But have you ever tried opening a gigantic text file with it? </p>
<!-- /wp:paragraph -->

<!-- wp:image {"id":3557,"align":"right"} -->
<div class="wp-block-image"><figure class="alignright"><img src="https://library.scalyr.com/2019/03/29130904/Log-file-viewer-crashes.png" alt="" class="wp-image-3557"/></figure></div>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>It'll hang, and then it will probably crash at some point. Or, if you go away overnight and are lucky, you might find your file opened in the morning, at which point you can sluggishly review it.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>This is an example of scaling terribly for purpose. And that makes sense, since Notepad wasn't meant for this sort of thing. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>But when you're talking about log file viewers, they are meant precisely for this sort of thing. So a good log file viewer should scale easily to large volumes of logs, and behave intelligently when opening such files.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>This means that it should load immediately and without sluggishness, showing you some subset of the data in the file. It should then set about loading more in the background or only on <g class="gr_ gr_5 gr-alert gr_gramm gr_inline_cards gr_run_anim Punctuation only-del replaceWithoutSep" id="5" data-gr-id="5">demand,</g> when you need it. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>If your log file viewer takes forever to open or crashes on searches, you need a new one.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2>2. Sophisticated and Intuitive Search</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Speaking of search, that's the next thing to demand in a log file viewer. When you're <a href="https://www.scalyr.com/blog/choosing-among-log-management-tools/">choosing among log management tools</a>, make sure your viewer can perform sophisticated search.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Text editors, the historical tool for this sort of viewing, have various capabilities here. Some, such as the aforementioned Notepad, support only basic text search. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Others may have more sophisticated capabilities, such as wildcard searches or even <a href="https://en.wikipedia.org/wiki/Regular_expression">regex</a> support. But they're still not designed for the use case that we have in mind. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>These text editors are for, well, editing text<strong>—</strong>not viewing and parsing large amounts of mostly textual data.</p>
<!-- /wp:paragraph -->

<!-- wp:image {"id":3549,"align":"center","width":512,"height":342} -->
<div class="wp-block-image"><figure class="aligncenter is-resized"><img src="https://library.scalyr.com/2019/03/29130328/Search-1024x683.jpeg" alt="" class="wp-image-3549" width="512" height="342"/></figure></div>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>A good log file viewer can, of course, <a href="https://www.scalyr.com/solutions/search-logs">support these searches</a>. But it <a href="https://www.scalyr.com/blog/searching-1tb-sec-systems-engineering-before-algorithms/">goes a lot further than that,</a>&nbsp;using algorithmic techniques designed specifically for this problem space.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>And, on the user experience side, it should also make search much more pleasant for you. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>As much as everyone likes dusting off their <a href="https://www.scalyr.com/blog/search-your-files-with-grep-and-regex/">regex</a> skills or googling for complicated recipes, a good log file viewer shouldn't force you to do that. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Instead, it should offer visual search assistance and make the experience as easy for you as possible.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2>3. Visualization Tools Are Important</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>At <g class="gr_ gr_7 gr-alert gr_gramm gr_inline_cards gr_run_anim Punctuation only-ins replaceWithoutSep" id="7" data-gr-id="7">first</g> blush, talking about visualization may seem a little strange. Isn't the whole premise of a log file&nbsp;<em>viewer</em> that it allows you to visualize your logs? &nbsp;</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Well, yes and no. Yes, a text editor allows you to physically see what text exists in your log files. But no, it doesn't really help you&nbsp;<em>visualize&nbsp;</em>it.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Here's what visualizing your logs looks like.</p>
<!-- /wp:paragraph -->

<!-- wp:image {"id":718,"align":"center","width":512,"height":512,"linkDestination":"custom"} -->
<div class="wp-block-image"><figure class="aligncenter is-resized"><a href="https://www.scalyr.com/tryScalyr"><img src="https://library.scalyr.com/2018/07/19175326/iStock-520056814-1024x1024.png" alt="A good log file viewer includes log visualization capabilities, like this." class="wp-image-718" width="512" height="512"/></a></figure></div>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>What your log files really contain is not text, but <em>data</em>. This means that you can meaningfully quantify it and observe trends. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>You can then use a good tool to represent these trends in graphical format. Graphs, like the one shown above, are an important part of this, as are dashboards.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Visuals give you instant, compelling insights about what's happening with your logs. A giant spike in <a href="https://httpstatuses.com/403">403 codes</a> in your log file might slip by unnoticed if text is your only means of viewing. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>But if you have a graph of 403s showing a giant spike in the last hour, you'll know instantly that something fishy is happening.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2>4. It Should Also Provide Reporting</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>Visualizing data is critical. But so too is having <g class="gr_ gr_6 gr-alert gr_gramm gr_inline_cards gr_run_anim Grammar multiReplace" id="6" data-gr-id="6">a means</g> to report on that data. The former can help you monitor trends as they happen and understand the big picture being painted by your software. </p>
<!-- /wp:paragraph -->

<!-- wp:image {"id":3545,"align":"right"} -->
<div class="wp-block-image"><figure class="alignright"><img src="https://library.scalyr.com/2019/03/29125829/r-log-files-store-data-that-properly-communicated-should-interest-everyone.1.png" alt="" class="wp-image-3545"/></figure></div>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>But the latter lets you communicate those trends to external stakeholders, including non-technical ones.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Your log files store data that, properly communicated, should interest everyone. Sure they'll have error codes and highly technical operation specifics. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>But they'll also let you paint pictures of things like up-time, reliability, traffic, and revenue.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>The log file viewer you choose should give you a means to generate custom reports based on these concerns (or any others you think of). </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>You can then take those reports and use the power of visualization to paint a picture for your non-technical peers.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2>5. They Give You the Means to Share Information and Collaborate</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>At first blush, "means to share information" may sound like another way to describe the visual and reporting capabilities. </p>
<!-- /wp:paragraph -->

<!-- wp:image {"id":3553,"align":"left"} -->
<div class="wp-block-image"><figure class="alignleft"><img src="https://library.scalyr.com/2019/03/29130533/collaboration1.png" alt="" class="wp-image-3553"/></figure></div>
<!-- /wp:image -->

<!-- wp:paragraph -->
<p>But I'm not talking specifically about visualizations and I'm not talking about socializing information with people outside of the IT group.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Instead, I'm talking about collaboration <em>within</em> the group. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>It's all well and good if you have a fancy tool that lets you search your logs, generate graphs, and report on them. But if you're the&nbsp;<em>only</em> one on the team with that ability, it's usefulness becomes somewhat limited. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Or, if everyone has the tool, but you have to recreate the same graphs and reports for every single person using it, it likewise becomes limited in usefulness.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>You need to make sure your log file viewer allows collaboration and sharing among all of the folks in IT that intend to use it.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p> If I create a dashboard and save it, you should have the ability to reference that dashboard. Same thing for any other custom capabilities that it gives you.</p>
<!-- /wp:paragraph -->

<!-- wp:heading -->
<h2>Take Advantage of What's Out There</h2>
<!-- /wp:heading -->

<!-- wp:paragraph -->
<p>I have, by no means, <g class="gr_ gr_5 gr-alert gr_gramm gr_inline_cards gr_run_anim Grammar multiReplace" id="5" data-gr-id="5">given</g> you an exhaustive list of what a log file viewer can provide for you. </p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>My intention here was simply to list some powerful features in order to make you aware of what's available to you.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>If you're using your favorite text editor to view log files, or even Notepad or the shell, that's completely understandable. Those tools have been around for a long time, you're comfortable with them, and they get the job done, after a fashion. &nbsp;</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>But you're missing out.</p>
<!-- /wp:paragraph -->

<!-- wp:paragraph -->
<p>Your log files have a lot of valuable information for you in the form of data. Make sure you're getting the most out of that data by picking out and using a sophisticated log file viewer.</p>
<!-- /wp:paragraph -->