Monitoring Kentico Event Log With Tail

When developing for Kentico, the event log can provide helpful debugging information. Keeping an eye on it can mean constantly refreshing the page. There is a better way to do this, which can be done by enabling Kentico’s ability to put items in the event log into a file, giving us access to a much wider range of tools for monitoring the log.

Configuring Kentico

The first step is to verify that Kentico is configured to save the event log to the file system. This can be done by going into the Admin page, and going into Settings > System. Inside the Event Log section, make sure that the Event log size setting is set to something above 0 (by default it is 1,000). You will also need to enable the Log to filesystem setting. You can see what this should look like on the screenshot below.

Event Log Settings

This will ensure that the event log is being written out to App_Data/logEvents.log. There are a number of different options that can be used to monitor the log.

Tail for Win32 is a GUI version of the UNIX tail -f command built for Windows. This command monitors a file for changes, and prints out the changed lines.

tail is a command line UNIX program which does exactly the same thing. on Mac or Linux systems, this program is already built in, but on Windows it takes a little bit more work to get it to run.

Configuring ConsoleZ with SourceTree

Once ConsoleZ has been downloaded, we need to configure it to use a bash environment. There are a number of ways to get a bash environment in Windows, including Cygwin and MSYS. I went a slightly simpler rout. SourceTree comes with a built in version of git, which includes a limited bash shell. Since I already have SourceTree installed and configured on my system, ConsoleZ can be configured to load this environment by default.

Open up the settings, and configure the Shell to be located at: C:\Users\<username>\AppData\Local\Atlassian\SourceTree\git_local\git-bash.bat. You can see the proper settings in the screenshot below.

ConsoleZ Settings

Once the shell has been set for ConsoleZ, you will need to open a new tab in ConsoleZ for it to load the proper environment. Then all it takes to load up tail is to run the following command:

tail -f Path-To-Kentico-Project/App_Data/logEvents.log

This will give you real-time monitoring for the Kentico event log while you are developing.

Written on March 12th, 2015 by Dan Walker

Want to read more?

If you’ve enjoyed what you’ve seen so far, you might like some of my other posts. Visit the archive to see all of my past writings.

Blog Archive »

About the Author

Dan Walker is a programmer from Grand Rapids, MI. He works at Gordon Food Service.

More About Dan »

Get in touch