Liking cljdoc? Tell your friends :D

riemann.logging


configure-from-fileclj

(configure-from-file context config-file)

Configure logging from a configuration file

Configure logging from a configuration file
sourceraw docstring

configure-from-optsclj

(configure-from-opts logger context opts)

Configure logging from opts

Configure logging from opts
sourceraw docstring

encodercljmultimethod

source

get-loggerclj

(get-logger)
(get-logger logger)
source

initclj

(init)
(init opts)

Initialize logging. You will probably call this from the config file. You can call init more than once; its changes are destructive. Options:

  • :console? Determine if logging should happen on the console.
  • :console-layout Specifying console layout.
  • :file The file to log to. If omitted, log to console only.
  • :file-layout Specifying file layout.
  • :files A list of files to log to. If provided, a seq or vector is expected containing maps with a :file and an :file-layout
  • :logsize-rotate If size (in bytes) is specified use size based rotation otherwise use default time based rotation.
  • :rotate-count Specifying the number of rotated files to keep. If omitted, keep last 10 rotated files.

Layout can be :riemann or :json. If layout is omitted, the default layout :riemann will be used.

For example:

    ; Basic console logging
    (init)

    ; Also log to a file
    (init {:file "/var/log/riemann.log"})

    ; With rotation
    (init {:console? false :file "/var/log/riemann.log" :rotate-count 10})

    ; Rotate at a certain size
    (init {:console? false
           :file "/var/log/riemann.log"
           :logsize-rotate 1000000000})

    ; Multiple files in different formats
    (init {:console? false
           :files [{:file "/var/log/riemann.log"},
                   {:file "/var/log/riemann.json.log" :file-layout :json}]
           :logsize-rotate 100
           :rotate-count 5})
Initialize logging. You will probably call this from the config file. You can
call init more than once; its changes are destructive. Options:

- :console?         Determine if logging should happen on the console.
- :console-layout   Specifying console layout.
- :file             The file to log to. If omitted, log to console only.
- :file-layout      Specifying file layout.
- :files            A list of files to log to. If provided, a seq or vector is
                    expected containing maps with a :file and an :file-layout
- :logsize-rotate   If size (in bytes) is specified use size based rotation
                    otherwise use default time based rotation.
- :rotate-count     Specifying the number of rotated files to keep. If omitted,
                    keep last 10 rotated files.

Layout can be :riemann or :json. If layout is omitted, the default layout
:riemann will be used.

For example:

```clojure
    ; Basic console logging
    (init)

    ; Also log to a file
    (init {:file "/var/log/riemann.log"})

    ; With rotation
    (init {:console? false :file "/var/log/riemann.log" :rotate-count 10})

    ; Rotate at a certain size
    (init {:console? false
           :file "/var/log/riemann.log"
           :logsize-rotate 1000000000})

    ; Multiple files in different formats
    (init {:console? false
           :files [{:file "/var/log/riemann.log"},
                   {:file "/var/log/riemann.json.log" :file-layout :json}]
           :logsize-rotate 100
           :rotate-count 5})
```
sourceraw docstring

nice-syntax-errorclj

(nice-syntax-error e)
(nice-syntax-error e file)

Rewrites clojure.lang.LispReader$ReaderException to have error messages that might actually help someone.

Rewrites clojure.lang.LispReader$ReaderException to have error messages that
might actually help someone.
sourceraw docstring

set-levelclj

(set-level level)
(set-level logger level)

Set the level for the given logger, by string name.

Example:

(set-level Level/INFO) or (set-level "riemann.client", Level/DEBUG)

Set the level for the given logger, by string name.

Example:

(set-level Level/INFO)
  or
(set-level "riemann.client", Level/DEBUG)
sourceraw docstring

suppresscljmacro

(suppress loggers & body)

Turns off logging for the evaluation of body.

Turns off logging for the evaluation of body.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close