# `Gno.CommitLogger`
[🔗](https://github.com/rdf-elixir/gno/blob/v0.1.0/lib/gno/commit_middlewares/logger.ex#L1)

A `Gno.CommitMiddleware` for logging commit operations.

Logs key commit events and collects log entries from other middlewares
through the processor's `:log` assign.

## Manifest Configuration

    @prefix gno: <http://gno.app/> .

    <Service> a gno:Service
        ; gno:serviceCommitOperation <CommitOperation>
        # ...
    .

    <CommitOperation> a gno:CommitOperation
        ; gno:commitMiddleware ( <Logger> )
    .

    <Logger> a gno:CommitLogger
        ; gno:commitLogLevel "debug"       # optional (default: "info")
        ; gno:commitLogChanges true        # optional (default: false)
        ; gno:commitLogMetadata true       # optional (default: false)
    .

## Options

- `:log_level` (`gno:commitLogLevel`) - the log level to use (default: `"info"`)
- `:log_states` (`gno:commitLogStates`) - list of states to log; `"all"` logs all
  states, `"none"` logs no state changes (default: `["initializing", "completed"]`)
- `:log_changes` (`gno:commitLogChanges`) - whether to log changeset details (default: `false`)
- `:log_metadata` (`gno:commitLogMetadata`) - whether to log commit metadata (default: `false`)

# `t`

```elixir
@type t() :: %Gno.CommitLogger{
  __additional_statements__: term(),
  __id__: term(),
  log_changes: term(),
  log_level: term(),
  log_metadata: term(),
  log_states: term(),
  state: term()
}
```

# `build`

# `build`

# `build!`

# `build!`

# `build_id`

# `from`

```elixir
@spec from(Grax.Schema.t()) :: {:ok, t()} | {:error, any()}
```

# `from!`

```elixir
@spec from!(Grax.Schema.t()) :: t()
```

# `load`

```elixir
@spec load(
  RDF.Graph.t() | RDF.Description.t(),
  RDF.IRI.coercible() | RDF.BlankNode.t(),
  opts :: keyword()
) :: {:ok, t()} | {:error, any()}
```

# `load!`

```elixir
@spec load!(
  RDF.Graph.t() | RDF.Description.t(),
  RDF.IRI.coercible() | RDF.BlankNode.t(),
  opts :: keyword()
) :: t()
```

# `log`

Adds a log entry to the processor's log assign.

## Options

- `:level` - The log level (default: "info")
- `:metadata` - Additional metadata to include in the log

# `new`

Creates a new CommitLogger middleware.

See module documentation for available options.

# `new!`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
