Back

use-timbre (clj)

(source)

function

(use-timbre) (use-timbre timbre-config)
Sets the root binding of `clojure.tools.logging/*logger-factory*` to use Timbre.

Examples

sikt-no/clj-jwt
(ns com.github.sikt-no.clj-jwt-test
  (:require [com.github.sikt-no.clj-jwt :as clj-jwt]
            [buddy.sign.jwt :as buddy-jwt]
            [buddy.core.keys :as buddy-keys]
            [taoensso.timbre :as timbre]
            [taoensso.timbre.tools.logging :as cljlog]
            [clojure.java.io :refer [resource]]
            [clojure.test :refer [deftest testing is]])
  (:import (java.time ZoneId ZonedDateTime)))

;; Effectively turn of logging in test
(def timbre-config  {:min-level :fatal})
(timbre/merge-config! timbre-config)
(cljlog/use-timbre)
sikt-no/clj-jwt
(ns com.github.sikt-no.jwks-refresh-test
  (:require [aleph.http :as http]
            [aleph.netty :as netty]
            [buddy.core.keys :as buddy-keys]
            [buddy.sign.jwt :as buddy-jwt]
            [cheshire.core :as cheshire]
            [clojure.test :refer [deftest is]]
            [com.github.sikt-no.clj-jwt :as clj-jwt]
            [taoensso.timbre :as timbre]
            [taoensso.timbre.tools.logging :as cljlog])
  (:import (java.net InetSocketAddress)
           (java.util.concurrent TimeUnit)
           (okhttp3.tls HeldCertificate$Builder)))

(def timbre-config {:min-level :fatal})
(timbre/merge-config! timbre-config)
(cljlog/use-timbre)