auto-core.log
Main entrypoint to auto core logging, defines basic levels that we use to log.
Logical order of logs is: trace -> debug -> info -> warn -> error -> fatal
Design decision: * the log is relying on configuration namespace, so nothing will be logged before that * the log api is hosted in a cljc
file so log is accessible to namespaces in cljc * Rationle: * deciding to push code in cljc should not prevent to log * postponing the decision to host code in frontend or backend is an objective * Consequence: * This namespace is the entrypoint for both clj and cljs implementations
cljs-env?
(cljs-env? env)
Take the &env from a macro, and tell whether we are expanding into cljs.
debug
macro
(debug & message)
You are providing diagnostic information in a thorough manner with DEBUG. It’s long and contains more information than you’ll need when gg using the application. The DEBUG logging level is used to retrieve data that is required to debug, troubleshoot, or test an application. This guarantees that the application runs smoothly.
debug-data
macro
(debug-data data & additional-message)
Like debug, but first argument is expected to be a map with usefull more detailed data.
debug-exception
macro
(debug-exception exception & additional-message)
Like debug, but focused on exceptions.
debug-format
macro
(debug-format fmt & args)
Like debug, but uses clojure format function, so first argument is string to translate and rest is arguments to supply it with.
error
macro
(error & message)
This ERROR indicates that something critical in your application has failed. This log level is used when a serious issue is preventing the application’s functionalities from functioning properly. The application will continue to run for the most part, but it will need to be handled at some point.
error-data
macro
(error-data data & additional-message)
Like error, but first argument is expected to be a map with usefull more detailed data.
error-exception
macro
(error-exception exception & additional-message)
Like error, but focused on exceptions.
error-format
macro
(error-format fmt & args)
Like error, but uses clojure format function, so first argument is string to translate and rest is arguments to supply it with.
fatal
macro
(fatal & message)
FATAL indicates that the application is about to prevent a major problem or corruption. The FATAL level of logging indicates that the application’s situation is critical, such as when a critical function fails. If the application is unable to connect to the data store, for example, you can utilise the FATAL log level.
fatal-data
macro
(fatal-data data & additional-message)
Like fatal, but first argument is expected to be a map with usefull more detailed data.
fatal-exception
macro
(fatal-exception exception & additional-message)
Like fatal, but focused on exceptions.
fatal-format
macro
(fatal-format fmt & args)
Like fatal, but uses clojure format function, so first argument is string to translate and rest is arguments to supply it with.
info
macro
(info & message)
INFO messages are similar to how applications normally behave. They describe what occurred. For example, if a specific service was stopped or started, or if something was added to the database. During normal operations, these entries are unimportant. The information written in the INFO log is usually useful, and you don’t have to do anything with it.
info-data
macro
(info-data data & additional-message)
Like info, but first argument is expected to be a map with usefull more detailed data.
info-exception
macro
(info-exception exception & additional-message)
Like info, but focused on exceptions.
info-format
macro
(info-format fmt & args)
Like info, but uses clojure format function, so first argument is string to translate and rest is arguments to supply it with.
stgy
Decides which strategy implementation to use for choosing the loggers.
trace
macro
(trace & message)
Records all of the application’s behaviour details. Its purpose is primarily diagnostic, and it is more granular and finer than the DEBUG log level. When you need to know what happened in your application or the third-party libraries you’re using, utilise this log level. The TRACE log level can be used to query code parameters or analyse algorithm steps.
trace-data
macro
(trace-data data & additional-message)
Like trace, but first argument is expected to be a map with usefull more detailed data.
trace-exception
macro
(trace-exception exception & additional-message)
Like trace, but focused on exceptions.
trace-format
macro
(trace-format fmt & args)
Like trace, but uses clojure format function, so first argument is string to translate and rest is arguments to supply it with.
warn
macro
(warn & message)
When an unexpected application issue has been identified, the WARN log level is used. This indicates that you are unsure if the issue will recur or not. At this time, you may not notice any negative effects on your application. This is frequently an issue that prevents some processes from operating. However, this does not necessarily imply that the application has been affected. The code should, in fact, continue to function normally. If the issue recurs, you should examine these warnings at some point.
warn-data
macro
(warn-data data & additional-message)
Like warn, but first argument is expected to be a map with usefull more detailed data.
warn-exception
macro
(warn-exception exception & additional-message)
Like warn, but focused on exceptions.
warn-format
macro
(warn-format fmt & args)
Like warn, but uses clojure format function, so first argument is string to translate and rest is arguments to supply it with.