1.2.0 permalink Arrow_down_16x16
  • (log-stream level log-ns)
Creates a PrintStream that will output to the log. End-users should not need
to invoke this.

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clojure/contrib/logging.clj:243 top

(defn log-stream
  "Creates a PrintStream that will output to the log. End-users should not need
  to invoke this."
  [level log-ns]
  (java.io.PrintStream.
    (proxy [java.io.ByteArrayOutputStream] []
      (flush []
        (proxy-super flush)
        (let [s (.trim (.toString ^java.io.ByteArrayOutputStream this))]
          (proxy-super reset)
          (if (> (.length s) 0)
            (log level s nil log-ns)))))
    true))
Vars in clojure.contrib.logging/log-stream: > defn flush let proxy proxy-super
Used in 0 other vars

Comments top

No comments for log-stream. Log in to add a comment.