# Smeltr logs

Gives the worker's own log records at or above a chosen level. It reads locally and needs no credentials.

## Example

Gives every log record at info or above.

```
{
  "id": "worker-logs",
  "type": "logs",
  "minLevel": "info"
}
```

![The smeltr logs form on the Sources page: id worker-logs, min level info.](/logs-source-form-light.png)

The same source in the Sources page's add dialog, as it is added.

## Settings

It also takes the settings [every source](/docs/sources#settings) takes.

`minLevel`  string default `info`

The lowest severity it gives. It gives only what the worker's [log level](/docs/operations#logs) collects.

`error`

Gives errors.

`warn`

Gives warnings and errors.

`info`

Gives info, warnings and errors.

`debug`

Gives everything but trace.

`trace`

Gives everything.

## Fields it gives

| Field | Type | Holds |
| --- | --- | --- |
| `__source.name` | `str` | The name of the source that read the record. |
| `__source.type` | `str` | The kind of source that read it, its `type`, such as `kafka`, `s3List`, `httpApi` or `hecReceiver`. |
| `__source.topic` | `str` | The Kafka topic, or event hub, the record came from. A metrics record carries `__smeltr_metrics` and a logs record `__smeltr_logs`. |
| `__source.bytes` | `bytes` | The record's payload as the source read it, before any decoding. The source decodes `_raw` from it. A `bytes` destination writes it unless the destination names another field. Text functions refuse it; `decode(__source.bytes, encoding)` reads it as text. |

## How it works

The source reads only what the process collects. To collect debug records, also set the worker's startup log level to debug and restart it. See [Change log verbosity](/docs/operations#logs).

## Verify

Compare a new worker log at or above the chosen level with the record at the destination. A quiet worker may have nothing new to send.

## See also

-   [Sources](/docs/sources)
-   [Smeltr metrics source](/docs/sources/metrics)
-   [Logs & metrics](/docs/logs-metrics)
-   [Change log verbosity](/docs/operations#logs)
