Last active
December 15, 2015 21:38
-
-
Save MichaelDrogalis/5326714 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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