Skip to content
June 7, 2012 / kiranpatils

SCLogExplorer User Guide

Challenge:

Since starting of my Sitecore career, due to my job’s nature. I’ve spent lot of time exploring Sitecore log files. And it was really fun and Sitecore log files has always been my first friend to consult whenever we see any unexpected behavior in Sitecore application!  (I’m sure for you too!)

In Sitecore world we all Sitecore developers, spend a lot of time analyzing Sitecore log files. And due to complexity of this we miss out obvious things. There are few nice tools available like (Notepad++, Log Parser, and Log Parser Lizard etc.) to analyze log files. But doing some deep analysis, and also doing it faster is not easy with these tools. Basically, wanted to have some native tool which works as per Sitecore log files (Yes, it has some functionality using which you can configure it as per your need!) and allows you to mine a gold from log files easily and rapidly! SCLogExplorer is an outcome of it; where SC stands for Sitecore. SCLogExplorer is my 3rd shared source module. (If you would like to know more about Shared source module, do read my earlier blog post here. And also have a look at my earlier two shared source modules — 1. CacheTuner and 2. QuickItemSearch)

This tool works with FileAppender (The default log4net appender which comes with Sitecore — If you have modified your Sitecore file appender’s  pattern. Then you can modify SCLogExplorer’s configuration file and use it), it got nice UI which highlights your output, shows in a grid, and has filter functionality where some predefined filter categories. And if they are not suitable for your need, don’t worry you can write your custom query as well!

This module is inspired from Apache Chainsaw. But it works with XML log files only.

I’ve penned down this article which describes How to use SCLogExplorer module? UI Basics? How it works?

Solution:

Main Features

  • Highlights rows by LogLevel : (Red == ERROR (Needs urgent attention), Green== INFO (You can Ignore them), Orange == Warning (No problem as of now. But it can be – Let’s be proactive!)).
  • Sort by all columns.
  • Total of all data at bottom! (Total files loaded, lines count, and size of all files).
  • Shows detailed information in right pane
  • You can load your selected files or full directory (It loads files asynchronously!)
  • You can filter, your data using predefined filters
  • You can write your custom query
  • It supports like search as well for Description (LogLevel=’WARN’ AND Description Like ‘%process%’ AND Time >=’14:41:00′ AND Time<=’14:51:20′). You can use DataView RowFilter Syntax.
  • You can clear your search and reload your all initially loaded data

Screen shots

  • Highlights rows by LogLevel : (Red == ERROR (Needs urgent attention), Green== INFO (You can Ignore them), Orange == Warning (No problem as of now. But it can be – Let’s be proactive!)).
  • Sort by all columns.
  • Total of all data at bottom! (Total files loaded, lines count, and size of all files).
  • Shows detailed information in right pane
  • You can filter, your data using predefined filters
  • You can write your custom query, also it supports like search as well for Description (LogLevel=’WARN’ AND Description Like ‘%process%’ AND Time >=’14:41:00′ AND Time<=’14:51:20′). You can use DataView RowFilter Syntax.

UI Basics?

above screenshot explains each bit.  The nice thing about tool is that each row gets highlighted as per LogLevel, it can have following three values:

  1. Red == Alert (Needs urgent attention).
  2. Green == Normal (You can Ignore them)
  3. Orange == Warning (No problem as of now. But it can be – Let’s be proactive!))

How it works?

Technically, we’ve written a Windows application, which parse full log file and converts all Data in a DataTable, which will make user’s searching experience easier and faster!

You can explore a configuration file from <InstalledDirectory>\SitecoreBasics.SCLogExplorer.exe.config[Just a note : Please read all comments given in that file, and modify it at your own risk! (Don’t worry, if you need any help, I’m here to help you out. But modify it if you really need it. For example if you have changed your Log file’s logging pattern etc.)]

I would like to hear from you

If your feedback is positive tell to your peers else post me a comment here about your feedback. Feel free to post your suggestions/comments/bugs in comments section.

Big thanks to Krunal Patel for providing me Regular expression and main logic for parsing a log file (It is a Core part of this tool)

Happy SCLog Exploring! 🙂

Advertisements

8 Comments

Leave a Comment
  1. Krunal / Jun 11 2012 9:10 pm

    Great Work Again.

    • kiranpatils / Jun 20 2012 10:08 pm

      Dear Krunal,

      Thanks, it would not have been possible without your help!

      Kiran

  2. Thanker / Jun 18 2012 1:16 pm

    Where is the link?

    • kiranpatils / Jun 20 2012 10:07 pm

      Mr. Thanker,

      Sorry it was my mistake. Here you go — http://trac.sitecore.net/SCLogExplorer

      Also, linked in article as well.

      Thank you for reading my blog and showing your interest in this module. I’m sure it will help you.

      Kiran

  3. Sucharitha / Aug 31 2012 4:56 pm

    Hi Kiran,

    Where do i need to install it? should it be on the web server where sitecore is installed or can I simply install it on my PC.

    Thank you,
    Sucharitha

    • kiranpatils / Sep 9 2012 5:50 pm

      Hello Sucharitha,

      First of all, thanks for showing your interest in module.

      You can simply install it on your PC and select your Sitecore log file(s) which you would like to explore!

      Let me know if you need further help, will be happy to help you!

      Keep visiting, Keep reading and Keep sharing! 🙂

      Sincerely,
      Kiran

  4. Yuriy Bogomolov (@YuriyBogomolov) / Nov 6 2012 8:13 pm

    Hi Kiran,

    Thank you, it’s always nice to see how our partners building custom infrastructure around Sitecore CMS 🙂 Keep up the great work!
    BTW, our fellow supporters Roman Bulanenko and Roman Chernyk have developed a great tool for log analysis, too. It’s called Sitecore Log Analyzer. Please take a look: http://sdn.sitecore.net/Resources/Tools/Log%20Analyzer.aspx

    Kind regards,
    Yuriy.

    • kiranpatils / Nov 6 2012 9:48 pm

      Dear Yuriy,

      It’s always pleasure to share knowledge — what we got! [Because knowledge shared is knowledge gained!]. Thanks a lot for the nice words! It stimulates, especially appreciation becomes more special when it comes from a person who works on that platform — who is always ready to support you with smile! 🙂

      Thanks, already tried my hands on Sitecore Log Analyzer — Honestly, it’s really cool tool! — Enjoyed using it.

      Keep reading, Keep visiting! Keep supporting us!

      Happy Sitecoring,
      Kiran

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: