Liking cljdoc? Tell your friends :D

rpm-shared.utils

Misc general-purpose utils.

Misc general-purpose utils.
raw docstring

get-intclj

(get-int x)

Returns given input (number or string) coerced to a Long (Clojure's standard integer type), otherwise returns nil.

Returns given input (number or string) coerced to a
Long (Clojure's standard integer type), otherwise
returns nil.
raw docstring

get-sys-valclj

(get-sys-val id)
(get-sys-val id default)

If the named JVM system property or environment variable exists, returns it as a string. Otherwise returns an optional default value (if provided), or throws.

Useful as a way to prevent hard-coding config!

If the named JVM system property or environment variable exists,
returns it as a string. Otherwise returns an optional default value
(if provided), or throws.

Useful as a way to prevent hard-coding config!
raw docstring

logmsgclj

(logmsg logcode ?msg)
(logmsg logcode ?msg ?data-map)

Returns a formatted log string like: "[logcode=<x>] msg="<msg>", <data-map-key1>="<data-map-val1>", ...

Useful for logging stuff to Splunk in a way that Splunk can ~easily index.

Returns a formatted log string like:
"[logcode=<x>] msg="<msg>", <data-map-key1>="<data-map-val1>", ...

Useful for logging stuff to Splunk in a way that Splunk can
~easily index.
raw docstring

map->splunk-strclj

(map->splunk-str m)

Given a map, returns a string using Splunk-style key-value pairs like "key1=value1, key2=value2, key3=value3".

These kinds of key-value pairs are detected by Splunk and can be used for automatic filtering, etc.

Given a map, returns a string using Splunk-style
key-value pairs like "key1=value1, key2=value2, key3=value3".

These kinds of key-value pairs are detected by Splunk and can
be used for automatic filtering, etc.
raw docstring

read-sys-valclj

(read-sys-val id)
(read-sys-val id default)

Like get-sys-val but will read system properties or environment variables as edn strings.

Can return any type, incl. keywords, longs, arbitrary data structures, etc.

Useful as a way to prevent hard-coding config!

Like `get-sys-val` but will _read_ system properties
or environment variables as edn strings.

Can return any type, incl. keywords, longs, arbitrary
data structures, etc.

Useful as a way to prevent hard-coding config!
raw docstring

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

× close