ApplicationLogger: a free application usage logger for Windows

I may like charts too much.

A while ago, I created a chart depicting all the programming platforms I’ve had used over the years:

Programming platforms chart

This was initially created mostly to illustrate the fact that the fall in popularity of Flash and ActionScript wasn’t a surprising event – technologies constantly come and go – but when I saw the result, I was still surprised at the number of platforms I’ve actually worked with in the past, and forgotten or abandoned.

Admittedly, however, the way I gathered the data for the chart wasn’t very scientific: I’d look at the projects I had worked in a given year, and fill the numbers with whatever percentage of my attention I thought I had given to each platform.

Starting with 2013, I decided to collect that data monthly, to try and make it a little bit more accurate. However, my approach for data collection didn’t change much; I was still mostly estimating the amount of time I had dedicated to each platform.

Every time I’d show my data to someone, people would ask me what I was using as a unit (was it time? lines of code? commits?). This led me to decide to make things a bit more accurate for 2014. Call it a New Year’s resolution, I suppose.

So for 2014, I wanted to have a way for measuring where I spent my time more accurately by measuring the application I’m running at any given time, and what kind of file I’m editing with it. Surprisingly, there are a few services that already do something like that – e.g., RescueTime – but none with the level of granularity and simplicity I wanted.

Long story short, to solve this problem and learn a bit more about desktop application development at the same time, I created a small application called Application Logger. This is a small Windows C#-based application that runs in the background and, well, simply logs details about applications being ran, saving it to a text file that can be analyzed later. It’s mostly a one-class application, with a very small footprint and not many features other than logging when the current user process changes and some customization options. Its output looks like this:

2014-12-11T12:55:12.3908117-05:00   app::focus  ZMACHINE    TweetDeck   C:\Program Files (x86)\Twitter\TweetDeck\TweetDeck.exe  TweetDeck
2014-12-11T13:00:39.6875381-05:00   app::focus  ZMACHINE    chrome  C:\Program Files (x86)\Google\Chrome\Application\chrome.exe Showtime Anytime app comes to Xbox One | Polygon - Google Chrome
2014-12-11T13:29:55.1320650-05:00   app::focus  ZMACHINE    firefox C:\Program Files (x86)\Mozilla Firefox\firefox.exe  C# snippets - Google Docs - Mozilla Firefox
2014-12-11T13:33:14.0059504-05:00   app::focus  ZMACHINE    notepad++   C:\Program Files (x86)\Notepad++\notepad++.exe  D:\apps\logger\ApplicationLogger.cfg - Notepad++ [Administrator]
2014-12-11T13:37:15.4130887-05:00   app::focus  ZMACHINE    explorer    C:\Windows\explorer.exe src
2014-12-11T11:37:23.3319560-05:00   app::focus  ZMACHINE    WDExpress   C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\WDExpress.exe   ApplicationLogger - Microsoft Visual Studio Express 2013 for Windows Desktop (Administrator)
2014-12-11T13:44:53.9509379-05:00   app::focus  ZMACHINE    studio64    C:\Users\zeh.fernando\AppData\Local\Android\android-studio-0.8.14\bin\studio64.exe  android - [D:\work\QWERTY_APPS2852\dev\android-app] - [app] - ...\app\src\main\java\com\querty\obfuscated\ApplicationConstants.java - Android Studio 1.0
2014-12-11T12:24:14.1160028-05:00   status::idle            
2014-12-11T13:49:01.4716875-05:00   status::stop  

It runs silently, in the background, as a tray application:

ApplicationLogger

I’ve been running it for a few weeks and now I consider it solid enough for daily use. I have it running on both my work and home computers, saving separate log files that can be analyzed later.

For illustration, after processing the data and using some RegEx to group them properly, this is what my programming time looked like for the last two weeks of December 2014 (mostly from working on a Unity game on my free time at home, and before I started running ApplicationLogger at work):

Application Logger chart

The application is available as an open source project on GitHub under the WTFPL license. A pre-compiled executable is also available, although it has no installation file (just copy it to where you want to run it from). And while it just generates a raw log that requires analyzing later, I’ve been working on a simple, standalone HTML page that does the trick (not very configurable yet, though).