Skip to content

Commit

Permalink
Tweak log levels.
Browse files Browse the repository at this point in the history
  • Loading branch information
oubiwann committed Feb 10, 2019
1 parent 6c24004 commit e2c2ea7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/rfc5322/core.clj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

(defn log-and-passthrough
[x level msg]
(log/log! level :p [msg])
(log/log level (str msg x))
x)

(defn convert
Expand Down
5 changes: 2 additions & 3 deletions src/rfc5322/parser.clj
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,8 @@
and nil otherwise. Because RFC 5322 is ambiguous, the returned parse tree
is the one with the least number of obsolete tokens."
[message-text mode]
(log/debugf "Parsing message \n%s\nUsing %s mode ..."
message-text
mode)
(log/debugf "Parsing message using %s mode ..." mode)
(log/tracef "Parsing message:\n" message-text)
(let [result (instaparse/parse (make-parser mode) message-text)]
(if (instaparse/failure? result)
(throw (new ParserException "Parse failure" (instaparse/get-failure result)))
Expand Down
4 changes: 2 additions & 2 deletions src/rfc5322/xform.clj
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
Note that this is by no means definitive or complete!"
[xs]
(log/tracef "Preparing to convert the following to a map:\n"
xs)
; (log/trace "Preparing to convert the following to a map:\n"
; xs)
(instaparse/transform
{:LF str
:line-feeds str
Expand Down

0 comments on commit e2c2ea7

Please sign in to comment.