Liking cljdoc? Tell your friends :D

ndevreeze.logger


closeclj

(close)

Close the currently active logger and appenders. Connected to err

Close the currently active logger and appenders.
Connected to *err*
sourceraw docstring

current-date-timeclj

(current-date-time)

Return current date and time in format yyyy-mm-ddTHH-MM-SS, based on current timezone

Return current date and time in format yyyy-mm-ddTHH-MM-SS, based on
current timezone
sourceraw docstring

debugclj

(debug & forms)
source

errorclj

(error & forms)
source

fatalclj

(fatal & forms)
source

get-loggerclj

(get-logger stream)

Get logger associated with (error) stream

Get logger associated with (error) stream
sourceraw docstring

infoclj

(info & forms)
source

initclj

(init {:keys [level file pattern location name cwd overwrite]
       :as opts
       :or {level :info
            file nil
            pattern "%h/log/%n-%d.log"
            location nil
            name "script"
            cwd nil
            overwrite false}})

Initialises a log file.

level - log level like :info, :debug file - give an explicit full path. Default is nil, use pattern pattern - use a pattern for the log file path, see below location - some pattern defaults/shortcuts, :home, :cwd, :script, :temp, default is nil name - script name, "script" bij default cwd - give an explicit current-working-dir, default is nil overwrite - boolean, overwrite an existing log file, default false

if all of file, pattern and location are nil, do not create a logfile, just log to the console.

To use in pattern:

  • %h = home dir
  • %c = current dir
  • %s = script dir (TBD)
  • %t = temp dir (/tmp, or c:/tmp)
  • %n = script name
  • %d = datetime, as yyyy-mm-ddTHH-MM-SS
Initialises a log file.

level     - log level like :info, :debug
file      - give an explicit full path. Default is nil, use pattern
pattern   - use a pattern for the log file path, see below
location  - some pattern defaults/shortcuts, :home, :cwd, :script, :temp, default is nil
name      - script name, "script" bij default
cwd       - give an explicit current-working-dir, default is nil
overwrite - boolean, overwrite an existing log file, default false

if all of file, pattern and location are nil, do not create a
logfile, just log to the console.

To use in pattern:
 - %h = home dir
 - %c = current dir
 - %s = script dir (TBD)
 - %t = temp dir (/tmp, or c:/tmp)
 - %n = script name
 - %d = datetime, as yyyy-mm-ddTHH-MM-SS
sourceraw docstring

init-internalclj

(init-internal)
(init-internal logfile)
(init-internal logfile loglevel)

Sets a default, appwide log adapter. Optional arguments set the default logfile and loglevel. If no logfile is provided, logs to stderr only. Should be able to handle multiple init calls. Return logger created (or re-used)

Sets a default, appwide log adapter. Optional arguments set the
default logfile and loglevel. If no logfile is provided, logs to
stderr only.
Should be able to handle multiple init calls.
Return logger created (or re-used)
sourceraw docstring

logclj

(log level forms)
(log logger level forms)

log to the logger associated with the current err stream

log to the logger associated with the current *err* stream
sourceraw docstring

log-formatclj

source

loggersclj

source

replace-letterclj

(replace-letter {:keys [cwd name] :as opts} letter)

Replace %h pattern etc with the actual values

Replace %h pattern etc with the actual values
sourceraw docstring

to-log-fileclj

(to-log-file {:keys [cwd name] :as opts} pattern)

Create a log file name based on given options and pattern

Create a log file name based on given options and pattern
sourceraw docstring

to-patternclj

(to-pattern pattern)

Convert pattern shortcut to an actual pattern for a log file

Convert pattern shortcut to an actual pattern for a log file
sourceraw docstring

traceclj

(trace & forms)
source

warnclj

(warn & forms)
source

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

× close