Idris2Doc : Pack.Core.Logging

Pack.Core.Logging

(source)

Definitions

data ConfirmResult : Type
Totality: total
Visibility: public export
Constructors:
Yes : ConfirmResult
No : ConfirmResult
Unknown : ConfirmResult
log : HasIO io => LogRef -> LogLevel -> Lazy String -> io ()
  Logs a message to stdout if the log level is greater than or equal
than the reference level `ref`.
If the given string contains newlines, all lines are printed indented
to the beginning of the first one.

Totality: total
Visibility: export
prompt : HasIO io => LogLevel -> String -> io String
  Logs a message to stdout and reads an reply from stdin.
This uses the given log level but makes sure the message is always
printed no matter the current log level preferences.

Totality: total
Visibility: export
confirm : HasIO io => LogLevel -> String -> io ConfirmResult
  Requests confirmation from the user with the specified message and
parses a reply from stdin as `Yes` or `No`.

This uses the given log level but makes sure the message is always
printed no matter the current log level preferences.

Totality: total
Visibility: export
confirmOrAbort : HasIO io => LogLevel -> String -> EitherT PackErr io ()
  Requests confirmation from the user with the specified message and
If the reply is not `Yes`, aborts with `SafetyAbort`.

This uses the given log level but makes sure the message is always
printed no matter the current log level preferences.

Totality: total
Visibility: export
logMany : HasIO io => LogRef => {default False _ : Bool} -> LogLevel -> Lazy String -> Lazy (List String) -> io ()
  Logs an idented list of values to stdout if the given log level
is greater than or equal than the (auto-implicit) reference level `ref`.
If messages list is empty, no log message is printed.

`inlineSingle` parameter being set to `True` makes a single element of
the given list to be printed at the same line as the main message.

Note: Most of the time `ref` is automatically being extracted from
a value of type `Pack.Config.Types.Config` in scope.

Totality: total
Visibility: export
promptMany : HasIO io => LogLevel -> String -> List String -> io String
  Logs an indented list of values to stdout and reads a reply from stdin.

This uses the given log level but makes sure the message is always
printed no matter the current log level preferences.

Totality: total
Visibility: export
confirmMany : HasIO io => LogLevel -> String -> List String -> io ConfirmResult
  Logs an indented list of values to stdout and requests confirmation
from the user and parses a reply from stdin as `Yes` or `No`.

This uses the given log level but makes sure the message is always
printed no matter the current log level preferences.

Totality: total
Visibility: export
confirmManyOrAbort : HasIO io => LogLevel -> String -> List String -> EitherT PackErr io ()
  Logs an indented list of values to stdout and requests confirmation
from the user. If the reply is not `Yes`, aborts with `SafetyAbort`.

This uses the given log level but makes sure the message is always
printed no matter the current log level preferences.

Totality: total
Visibility: export
debug : HasIO io => LogRef => Lazy String -> io ()
  Alias for `log ref Debug`.

Note: Most of the time `ref` is automatically being extracted from
a value of type `Pack.Config.Types.Config` in scope.

Totality: total
Visibility: export
info : HasIO io => LogRef => Lazy String -> io ()
  Alias for `log ref Info`.

Note: Most of the time `ref` is automatically being extracted from
a value of type `Pack.Config.Types.Config` in scope.

Totality: total
Visibility: export
cache : HasIO io => LogRef => Lazy String -> io ()
  Alias for `log ref Cache`.

Note: Most of the time `ref` is automatically being extracted from
a value of type `Pack.Config.Types.Config` in scope.

Totality: total
Visibility: export
warn : HasIO io => LogRef => Lazy String -> io ()
  Alias for `log ref Warning`.

Note: Most of the time `ref` is automatically being extracted from
a value of type `Pack.Config.Types.Config` in scope.

Totality: total
Visibility: export
fatal : HasIO io => PackErr -> io a
  Fail fatally with error message logged.
This is like `System.die` but with error printer like a log message.

Totality: total
Visibility: export