Skip to content

Commit 3f44502

Browse files
committed
Improve docs
1 parent af2e1b2 commit 3f44502

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ library._
6868
To control which logging implementation is used, set the `clojure.tools.logging.factory`
6969
system property to the fully-qualified name of a no-arg function that returns an
7070
instance of `clojure.tools.logging.impl/LoggerFactory`. There are a number of
71-
factory functions provided in the `clojure.tools.logging.impl` namespace.
71+
factory functions provided in the [`clojure.tools.logging.impl`](https://clojure.github.io/tools.logging/#clojure.tools.logging.impl/find-factory)
72+
namespace.
7273

7374
[Leiningen example]:
7475

src/main/clojure/clojure/tools/logging/readable.clj

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77
;; remove this notice, or any other, from this software.
88

99
(ns ^{:author "Alex Taggart"
10-
:doc "Logging macros that support printing message arguments readably.
10+
:doc "Logging macros that support printing message (some) arguments as
11+
if wrapped in pr-str, the goal being to preserve their data representation
12+
distinct from the explanatory text. See logp and logf for details regarding
13+
which args are treated in this manner.
1114
1215
Examples:
1316
@@ -33,8 +36,9 @@
3336

3437
(defmacro logp
3538
"Logs a message using print style args, where message args that are not
36-
literal strings will be printed readably. Can optionally take a throwable as
37-
its second arg. See level-specific macros, e.g., debug."
39+
literal strings will be printed readably, as if wrapped in pr-str. Can
40+
optionally take a throwable as its second arg. See level-specific macros,
41+
e.g., debug."
3842
{:arglists '([level message & more] [level throwable message & more])}
3943
[level x & more]
4044
; Why bind `*print-readably*` to true?
@@ -65,8 +69,8 @@
6569

6670
(defmacro logf
6771
"Logs a message using a format string and args, where all format args will be
68-
printed readably. Can optionally take a throwable as its second arg. See
69-
level-specific macros, e.g., debugf."
72+
printed readably, as if wrapped in pr-str. Can optionally take a throwable as
73+
its second arg. See level-specific macros, e.g., debugf."
7074
{:arglists '([level fmt & fmt-args] [level throwable fmt & fmt-args])}
7175
[level x & more]
7276
(if (or (instance? String x) (nil? more)) ; optimize for non-exception case

0 commit comments

Comments
 (0)