Skip to content

Commit

Permalink
[log] Add primitive hints to logging level functions (#182)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-yakushev authored Oct 4, 2024
1 parent e14a45e commit 646bbd1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/toucan2/log.clj
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
texts (map ->Text* (str/split format-string #"%s"))]
`(->Doc ~(vec (interleave-all texts args)))))

(defn- level->int [a-level default]
(defn- level->int ^long [a-level ^long default]
(case a-level
:disabled 5
:error 4
Expand All @@ -163,7 +163,7 @@
;;; convenient.
(defn ^:no-doc -current-level-int
"Current log level, as an integer."
[]
^long []
(level->int (or *level* @level) Integer/MAX_VALUE))

(defmacro ^:no-doc -enable-level?
Expand Down

0 comments on commit 646bbd1

Please sign in to comment.