Standardized logging configuration.
Standardized logging configuration.
(add-component-appender appender-kw namespaces filename & {:as rotor-opts})
Generates a function which will add a component specific rotating log appender to a Timbre log configuration.
appender-kw
The keyword identifier for the created component appender.namespaces
A sequence of string patterns ("com.foo.*"
...) used to
direct log messages for matching namespaces to the created appender and
away from the :stdout
log.filename
The name of the created log file.Also accepts the following appender specific options:
max-size
The maximum size a log file can grow (in bytes) before being
rotated.backlog
The number of rotating logs to retain.Returns a function which takes Timbre log configuration map and returns the modified configuration.
Generates a function which will add a component specific rotating log appender to a Timbre log configuration. - `appender-kw` The keyword identifier for the created component appender. - `namespaces` A sequence of string patterns (`"com.foo.*"` ...) used to direct log messages for matching namespaces to the created appender and away from the `:stdout` log. - `filename` The name of the created log file. Also accepts the following appender specific options: - `max-size` The maximum size a log file can grow (in bytes) before being rotated. - `backlog` The number of rotating logs to retain. Returns a function which takes Timbre log configuration map and returns the modified configuration.
(base-config)
(base-config dir)
Create a base logging configuration for all Kurosawa libraries and apps for use in a production context.
dir
The root logging directory, defaults to prod-dir
if not
specified.Create a base logging configuration for all Kurosawa libraries and apps for use in a production context. - `dir` The root logging directory, defaults to `prod-dir` if not specified.
(envmap)
A map of all the symbols and their values currently bound in the environment.
A map of all the symbols and their values currently bound in the environment.
(fn-trace fn-name args)
Log the invocation of a function at :trace
level along with its arguments.
fn-name
The name of the function being invoked as a keyword.args
A map of the function argument names (as keyword) and values.This function should be called (for side-effects only) at the start of the function being traced.
Log the invocation of a function at `:trace` level along with its arguments. - `fn-name` The name of the function being invoked as a keyword. - `args` A map of the function argument names (as keyword) and values. This function should be called (for side-effects only) at the start of the function being traced.
(format-msg msg params-map)
Generate a formatted string suitable for log messages.
msg
The main log message text.params-map
A map of information (usually function parameters) to include
as part of the formatted message in a standardized form easy for log parsing.Generate a formatted string suitable for log messages. - `msg` The main log message text. - `params-map` A map of information (usually function parameters) to include as part of the formatted message in a standardized form easy for log parsing.
(init-dev-logging)
(init-dev-logging system)
(init-dev-logging system excluded-comp-keys)
Initialize development logging for a component system.
With no arguments, both the low-level and high-level logging will be sent to the console.
With a single system
argument, only high-level logging will be sent to
the console. All low-level logging, as defined by (log-namespaces)
on
the components will be omitted.
If both a system
and excluded-comp-keys
are given, then some low-level
logging will be omitted based on the excluded components. High-level
logging will always be included.
system
The initialized component system.excluded-comp-keys
A sequence of keyword identifiers of components for
which low-level logging should be excluded.This is a side-effecting function that modifies and returns the
taoensso.timbre/*config*
value.
Initialize development logging for a component system. With no arguments, both the low-level and high-level logging will be sent to the console. With a single `system` argument, only high-level logging will be sent to the console. All low-level logging, as defined by `(log-namespaces)` on the components will be omitted. If both a `system` and `excluded-comp-keys` are given, then some low-level logging will be omitted based on the excluded components. High-level logging will always be included. - `system` The initialized component system. - `excluded-comp-keys` A sequence of keyword identifiers of components for which low-level logging should be excluded. This is a side-effecting function that modifies and returns the `taoensso.timbre/*config*` value.
(init-prod-logging system)
(init-prod-logging system dir)
Initialize production logging for a component system.
Only high-level component logging will be sent to the console.
Per-component low-level logging will be written to separate rolling log
files. See individual components for details of the names of these log
files. Finally, all logging will be consolidated in a single rolling log
file called all.log
.
system
The initialized component system.dir
The root logging directory, defaults to prod-dir
if not
specified.This is a side-effecting function that modifies and returns the
taoensso.timbre/*config*
value.
Initialize production logging for a component system. Only high-level component logging will be sent to the console. Per-component low-level logging will be written to separate rolling log files. See individual components for details of the names of these log files. Finally, all logging will be consolidated in a single rolling log file called `all.log`. - `system` The initialized component system. - `dir` The root logging directory, defaults to `prod-dir` if not specified. This is a side-effecting function that modifies and returns the `taoensso.timbre/*config*` value.
(output-fn data)
(output-fn opts data)
Default logging output function.
Use (partial output-fn <opts-map>)
to modify default opts.
Default logging output function. Use `(partial output-fn <opts-map>)` to modify default opts.
The root directory under which production log files are written.
The root directory under which production log files are written.
(set-level level)
Set the default logging level.
level
Possible values: :trace
:debug
:info
:warn
:error
:fatal
:report
Useful shortcut for temporarily changing logging level from the REPL.
Set the default logging level. - `level` Possible values: `:trace` `:debug` `:info` `:warn` `:error` `:fatal` `:report` Useful shortcut for temporarily changing logging level from the REPL.
(system-log-configure system dir)
Generate a single function which combines all logging configuration for all components in a system.
system
The initialized component system.dir
The root logging directory.Returns a function which takes Timbre log configuration map and returns the modified configuration.
Generate a single function which combines all logging configuration for all components in a system. - `system` The initialized component system. - `dir` The root logging directory. Returns a function which takes Timbre log configuration map and returns the modified configuration.
(system-log-namespaces system)
(system-log-namespaces system comp-keys)
Collect the namespace patterns from the named components of the system.
system
The initialized component system.comp-keys
The keyword identifiers of selected components, if not
specified all components are selected.Collect the namespace patterns from the named components of the system. - `system` The initialized component system. - `comp-keys` The keyword identifiers of selected components, if not specified all components are selected.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close