Guest User

Untitled

a guest
Nov 9th, 2014
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (def file-to-read "/tmp/fff")
  2.  
  3. (def tailer-adapter (reify TailerListener
  4.                       (init [this tailer] ())
  5.                       (fileNotFound [this])
  6.                       (fileRotated [this])
  7.                       (^void handle [this ^Exception i] (println (str "exception: " i)))
  8.                       (^void handle [this ^String line] (println (str "line: " line)))))
  9.  
  10. (def tailer (Tailer/create (File. file-to-read) tailer-adapter))
  11.  
  12. (defn -main []
  13.   (println "start")
  14.   (.run tailer))
Advertisement
Add Comment
Please, Sign In to add comment