Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Tweak the readme.

  • Loading branch information...
commit 25b7ec91256fdcc770e323d809ed1a1cd4015e1b 1 parent ec33ac5
@ataggart ataggart authored
Showing with 8 additions and 8 deletions.
  1. +8 −8 README.md
View
16 README.md
@@ -6,13 +6,13 @@ Logging levels are specified by clojure keywords corresponding to the values use
:trace, :debug, :info, :warn, :error, :fatal
-Logging occurs with the log macro, or the level-specific convenience macros, which write either directly or via an agent. The log macros will not evaluate their 'message' unless the specific logging level is in effect. Alternately, you can use the spy macro when you have code that needs to be evaluated, and also want to output the code and its result to the log.
+Logging occurs with the `log` macro, or the level-specific convenience macros, which write either directly or via an agent. The log macros will not evaluate their 'message' unless the specific logging level is in effect. Alternately, you can use the `spy` macro when you have code that needs to be evaluated, and also want to output the code and its result to the log.
-Unless otherwise specified, the current namespace (as identified by *ns*) will be used as the log-ns (similar to how the java class name is usually used). Note: your logger configuration should display the name that was passed to the logging implementation, and not perform stack-inspection, otherwise you'll see some ugly and unhelpful text in your logs.
+Unless otherwise specified, the current namespace (as identified by `*ns*`) will be used as the log-ns (similar to how the java class name is usually used). Note: your logger configuration should display the name that was passed to the logging implementation, and not perform stack-inspection, otherwise you'll see some ugly and unhelpful text in your logs.
-Use the enabled? macro to write conditional code against the logging level (beyond simply whether or not to call log, which is handled automatically).
+Use the `enabled?` macro to write conditional code against the logging level (beyond simply whether or not to call log, which is handled automatically).
-You can redirect all java writes of System.out and System.err to the log system by calling log-capture!. To bind *out* and *err* to the log system invoke with-logs. In both cases a log-ns (e.g., \"com.example.captured\") must be specified in order to namespace the output.
+You can redirect all java writes of `System.out` and `System.err` to the log system by calling `log-capture!`. To bind `*out*` and `*err*` to the log system invoke `with-logs`. In both cases a log-ns (e.g., "com.example.captured") must be specified in order to namespace the output.
## Usage
@@ -27,7 +27,7 @@ The following short example should give you what you need to get started:
(catch Exception ex
(error ex "There was an error in calculation"))))
-For those new to using a java logging library, the following is a very basic configuration for log4j. Place it in a file called \"log4j.properties\" and place that file (and the log4j JAR) on the classpath.
+For those new to using a java logging library, the following is a very basic configuration for log4j. Place it in a file called `log4j.properties` and place that file (and the log4j JAR) on the classpath.
log4j.rootLogger=WARN, A1
log4j.logger.user=DEBUG
@@ -35,7 +35,7 @@ For those new to using a java logging library, the following is a very basic con
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%d %-5p %c: %m%n
-The above will print messages to the console for :debug or higher if one is in the user namespace, and :warn or higher in all other namespaces.
+The above will print messages to the console for `:debug` or higher if one is in the `user` namespace, and `:warn` or higher in all other namespaces.
### "Installation"
@@ -44,12 +44,12 @@ Logging is available in Maven central. Add it to your Maven project's `pom.xml`
<dependency>
<groupId>org.clojure</groupId>
<artifactId>tools.logging</artifactId>
- <version>0.1.2</version>
+ <version>0.2.0</version>
</dependency>
or your leiningen project.clj:
- [org.clojure/tools.logging "0.1.2"]
+ [org.clojure/tools.logging "0.2.0"]
Please note the changelog below.
Please sign in to comment.
Something went wrong with that request. Please try again.