Back

infof (clj)

(source)

macro

(infof & args)

Examples

yapsterapp/a-frame
(ns a-frame.log
  "overrides of the timbre logging macros
   which set a context from an a-frame
   interceptor-context key, or app-ctx key"
  #?(:cljs (:require-macros [a-frame.log]))
  (:require
   [taoensso.timbre :as timbre]
   [a-frame.schema :as af.schema]))

(defmacro infof
  [context-src & args]
  `(with-a-frame-log-context ~context-src
     (timbre/log! :info   :f ~args ~{:?line (@#'timbre/fline &form)})))
pink-gorilla/goldly
(ns goldly.component.load
  (:require
   [re-frame.core :as rf]
   [taoensso.timbre :as timbre :refer-macros [debug debugf info infof error errorf]]))

(rf/reg-event-db
 :index/store
 (fn [db [_ {:keys [type data] :as x}]]
   (let [index (:index db)]
     (infof "index/store type: %s" x)
     (debugf "index/store type: %s data: %s" type data)
     (-> (if (nil? index)
           (assoc db :index {})
           db)
         (assoc-in [:index type] data)))))

(rf/reg-event-db
 :component/store
 (fn [db [_ {:keys [id type] :as data}]]
   (let [component (:component db)]
     (infof "component/store type: %s id: %s" type id)
     (-> (if (nil? component)
           (assoc db :component {})
           db)
         (assoc-in [:component type id] data)))))
pink-gorilla/goldly
(ns goldly.component.type.system
  (:require
   [taoensso.timbre :as timbre :refer-macros [debugf infof errorf]]
   [goldly.component.ui :refer [render-component]]
   [goldly.system.sci :refer [render-system]]))

(defmethod render-component :system [{:keys [id data args]}]
  (let [{:keys [fns-clj cljs]} @data
        {:keys [ext]} args]
    (infof "rendering system: id: %s data: %s args: %s" id @data args)
    [render-system (merge {:id id
                           :fns-clj fns-clj}
                          cljs) ext]))
aliostad/deep-learning-lang-detection
(ns jiksnu.step-definitions
  (:require [jiksnu.helpers.action-helpers :as helpers.action]
            [jiksnu.helpers.http-helpers :as helpers.http]
            [jiksnu.helpers.page-helpers :as page-helpers
             :refer [by-css by-model current-page element expect]]
            [jiksnu.pages.LoginPage :as lp :refer [LoginPage login]]
            [jiksnu.pages.RegisterPage :refer [RegisterPage]]
            [jiksnu.PageObjectMap :as pom]
            [taoensso.timbre :as timbre])
  (:use-macros [jiksnu.step-macros :only [step-definitions Given When Then And]]))

 (Given #"^I am (not )?logged in$" [not-str next]
   (timbre/infof "Not str: %s" not-str)
   (if (empty? not-str)
     (.. (helpers.action/login-user) (then next))
     (do
       (timbre/info "Deleting all cookies")
       (.. js/browser manage deleteAllCookies (then next)))))

   (timbre/infof "Page: %s" page-name)

   (timbre/infof "Url: %s" (current-page) )

   (let [page-object (aget pom/pages page-name)]
     (timbre/infof "Page object: %s" page-object)
     (.. (page-object.) get (then next))))

 (Then #"^I should not see a \"([^\"]*)\" button for that user$" [button-name next]
   (let [class-name (str "." button-name "-button")]
     (timbre/infof "Class Name: %s" class-name)
     (.. (expect (-> (by-css class-name) element .isPresent))
         -to -eventually -be -false))
   (next))

 (Then #"^I should see an activity$" [next]
   (let [article-element (element (by-css "article"))]
     (timbre/infof "checking activity - %s" article-element)
     (.. (expect (.isPresent article-element))
         -to -eventually (equal true)))
   (next))
kronkltd/jiksnu
(ns jiksnu.step-definitions
  (:require [jiksnu.helpers.action-helpers :as helpers.action]
            [jiksnu.helpers.http-helpers :as helpers.http]
            [jiksnu.helpers.page-helpers :as page-helpers
             :refer [by-css by-model current-page element expect]]
            [jiksnu.pages.LoginPage :as lp :refer [LoginPage login]]
            [jiksnu.pages.RegisterPage :refer [RegisterPage]]
            [jiksnu.PageObjectMap :as pom]
            [taoensso.timbre :as timbre])
  (:use-macros [jiksnu.step-macros :only [step-definitions Given When Then And]]))

 (Given #"^I am (not )?logged in$" [not-str next]
   (timbre/infof "Not str: %s" not-str)
   (if (empty? not-str)
     (.. (helpers.action/login-user) (then next))
     (do
       (timbre/info "Deleting all cookies")
       (.. js/browser manage deleteAllCookies (then next)))))

   (timbre/infof "Page: %s" page-name)

   (timbre/infof "Url: %s" (current-page) )

   (let [page-object (aget pom/pages page-name)]
     (timbre/infof "Page object: %s" page-object)
     (.. (page-object.) get (then next))))

 (Then #"^I should not see a \"([^\"]*)\" button for that user$" [button-name next]
   (let [class-name (str "." button-name "-button")]
     (timbre/infof "Class Name: %s" class-name)
     (.. (expect (-> (by-css class-name) element .isPresent))
         -to -eventually -be -false))
   (next))

 (Then #"^I should see an activity$" [next]
   (let [article-element (element (by-css "article"))]
     (timbre/infof "checking activity - %s" article-element)
     (.. (expect (.isPresent article-element))
         -to -eventually (equal true)))
   (next))