O'Reilly logo

Clojure Recipes by Julian Gamble

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

24. Detecting Errors with a Log Monitoring Application

Imagine you have a particular bug in production, something that only occurs once a day. When it does occur, you want to know about it right away. You need a tool to monitor the log files and trigger a warning when a bug occurs. What a great opportunity to use Clojure in your day job!

Assumptions

In this chapter we assume you have Leiningen set up on your machine.

Benefits

The benefit of this chapter is that you learn a way to use Clojure in your day-to-day job when maintaining a production system.

The Recipe—Code

In this recipe we’ll produce a simple Clojure project to read a log file being updated in real time, and we’ll take action if an error is detected. Let’s get started.

1. Create ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required