Prashant is the Oz behind Chronon. Inspired and frustrated by years of breakpoint guesswork in the current debuggers and fumbling with printin() statements and logging frameworks, Prashant set out to find a different way to debug programs. Chronon is the result of his efforts. Prashant has posted 22 posts at DZone. You can read more from them at their website. View Full User Profile

Chronon 2.0 fixes everything wrong with Logging

  • submit to reddit

Lets get this straight. Currently the only real way to debug long running, server side applications, is by looking at log files. Yet, logging in its current form is fundamentally broken.

What's wrong with logging currently?

The paradox of logging:

  1. You put a logging statement at a piece of code where you 'think' might be a bug.
  2. Because you already thought about the bug at that place, you already hardened the code there.
  3. In real life, errors happen where you least expected them to
  4. Thus, what really happens is, you never end up putting a log statement where the error actually ends up occurring.

Apart from the above paradox which occurs due to the fact that you are basically trying to predict errors in advance, logging has other evils:

  • It clutters up your code and hides actual logic.
  • Its a huge distraction from actual coding.
  • Log levels  - Not only do you need to think of the log statements, but also the 'level' of logging. Talk about predicting errors, this practically needs you to be Nostradamus.....
  • Also it is just real fun to figure out a bug from a long running server which has a ginormous log file.

Whats good then?

That said, there is something good about logging after all.

If in the miraculous case, you do get your log statements positioned exactly right, looking at a log file can give you a quick overview of the execution of your program.

Chronon 2.0 and Post Execution Logging

With Chronon 2.0, we are reinventing logging, just like we reinvented the debugger only a few months ago.

The Post Execution Logging functionality in Chronon 2.0 allows you to add logging to a program after it has executed.

Yes, you read that right. You can actually add logging after your code's execution! 

Not only that:

  • You can access all your variables (just like in regular logging statements)
  • You will the results of the log execution instantly without having to wait for the program to rexecute fully!
  • In true Chronon fashion, clicking on a line of log output will take you directly to the point in time when that statement was output, so you can see the entire state of your program and use the step back functionality to find the root cause of your issue.

That also means you can finally get rid of all those logging statements in your program that are cluttering up your code and focus only on developing your software.

If all this still sounds crazy to you, see the video below to see Post Execution Logging in action.

Read more details on Post Execution logging.

Evaluation Expired?

Btw, if your Chronon 1.0 evaluation has expired and you still want to try out Chronon 2.0, just go ahead and download it and you will get another 30 days of free trial!


Published at DZone with permission of its author, Prashant Deva.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)


Keith Barret replied on Thu, 2011/09/22 - 4:24am

Your high-frequency of reoccuring, product plugs for this commercial product on DZone start to get really annoying. Already three posts only this week.

Danny Lee replied on Thu, 2011/09/22 - 9:29am in response to: Keith Barret

100% agree!

Regarding these products please write in post subject "COMMERCIAL:", so people using free open source only could just ignore these posts.


Jonathan Fisher replied on Thu, 2011/09/22 - 7:18pm in response to: Danny Lee

You know, Chronon _CAN_ pay for advertising right? You're big boys now... now fork over money to DZone to have proper advertisements. Quit freeloading off of DZone. BTW, be sure to check out the comments here to see the hilarious exchange between the CTO of Chronon and a potential buyer of his product. Hilarious!

Jonathan Fisher replied on Thu, 2011/09/22 - 7:19pm

And traditional logging rocks btw. I <3 it.

Denis Robert replied on Fri, 2011/09/23 - 7:13am

For those of you who are annoyed at the "ad" nature of this post, notice that it's a re-post from an internal Chronon blog...

Andy Jefferson replied on Fri, 2011/09/23 - 8:11am in response to: Denis Robert

Its a repeat of 4 other posts also. aka spam. If someone is publicising a product fine, but that should be a single post defining all of the benefits etc of their solution ... and should not keep on churning variations of the same "headline" over a 2 week period.

Mohan Ambalavanan replied on Sat, 2011/09/24 - 12:36am

Me too I am really frustrated with these commercial posts....Dzone shud really consider separate opensource feeds from commercial products and start charging for every commercial products post...

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.