logger_backend_sqlite v2.2.0 LoggerBackendSqlite

Logger backend for saving log data into a Ecto Repo.

Usage

{:ok, _} = Logger.add_backend(LoggerBackendSqlite) require Logger Logger.info “hello, world” Logger.remove_backend(LoggerBackendSqlite)

Link to this section Summary

Functions

Returns all logs

Returns a File.Stat of the database, or :memory if not backed by file

Link to this section Types

Link to this opaque db() (opaque)
db()
Link to this type initialized()
initialized() :: %LoggerBackendSqlite{
  db: db(),
  dbname: charlist(),
  insert_stmt: stmt(),
  max_logs: pos_integer()
}
Link to this type log()
log() :: LoggerBackendSqlite.Log.t()
Link to this opaque stmt() (opaque)
stmt()
Link to this type uninitialized()
uninitialized() :: %LoggerBackendSqlite{
  db: nil,
  dbname: charlist(),
  insert_stmt: nil,
  max_logs: pos_integer()
}

Link to this section Functions

Link to this function all_logs()
all_logs() :: [log()]

Returns all logs.

Link to this function stat()
stat() :: :memory | File.Stat.t()

Returns a File.Stat of the database, or :memory if not backed by file.