Skip to content

Instantly share code, notes, and snippets.

@MichaelDrogalis
Last active December 15, 2015 21:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save MichaelDrogalis/5326714 to your computer and use it in GitHub Desktop.
Save MichaelDrogalis/5326714 to your computer and use it in GitHub Desktop.
(ns project.logging
(:require [clojure.tools.logging :refer [info warn]]
[dire.core :refer [with-pre-hook!]]
[project.destructure :refer :all]))
(with-pre-hook! #'destructure-cow-list
(fn [connection]
(info connection "is listing cows.")))
(with-pre-hook! #'destructure-cow-create
(fn [connection message]
(info connection "is creating a cow:" message)))
(with-pre-hook! #'destructure-chicken-bind
(fn [connection message]
(info connection "is binding to a chicken:" message)))
(with-pre-hook! #'destructure-chicken-unbind
(fn [connection]
(info connection "is unbinding from a chicken.")))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment