Clojurescript logger with feature flipping

Problem: after bunch of lines in console after logging all the things one might want feature filler on that output
code:

(ns app.logger)
(enable-console-print!)
(def tagsOn [:intercom :mloop])
(defn og [type format data]
  (if (or (some  #{type} tagsOn) (some #{:all} tagsOn))
  (.log js/console (+ type " " format) data )
))

usage

           (l/og :intercom "message %s in intercom" data )
            

Leave a Comment