[**Documentation**](../../../README)

***

[Documentation](../../../README) / [zerotal](../../README) / [logger](../README) / LoggingConfig

# Function: LoggingConfig()

> **LoggingConfig**(`options?`): [`LoggingConfigShape`](../interfaces/LoggingConfigShape)

Defined in: [packages/core/src/logger/config.ts:78](https://github.com/zerotaldev/zerotal/blob/1d6fb26b05b18ba077de1bfaeb46c42131cd8b70/packages/core/src/logger/config.ts#L78)

Build a [LoggingConfigShape](../interfaces/LoggingConfigShape) with framework defaults applied.

Out of the box every entry goes two places: the terminal, and a date-rotated
file under `./storage/logs` kept for 14 days. Both are on by default and
independent of each other — you can silence the terminal without losing the
trail, which is the entire point of having one.

Named `channels` are *extra* destinations layered on top, for routing a
subsystem somewhere specific. Because `channels` is a name-keyed map,
anything you add is merged in rather than replacing the map.

## Parameters

### options?

`Partial`\<[`LoggingConfigShape`](../interfaces/LoggingConfigShape)\> = `{}`

Partial overrides deep-merged over the defaults.

## Returns

[`LoggingConfigShape`](../interfaces/LoggingConfigShape)

The resolved, fully-populated logging config.

## Examples

```ts
// config/logging.ts — the defaults, spelled out
import { LoggingConfig } from "@zerotal/core/logger";

export default LoggingConfig();
```

```ts
// Quiet terminal, full trail on disk, a month of history
export default LoggingConfig({
  console: { level: "warn" },
  file: { days: 30 },
});
```

```ts
// No files at all — containers that ship stdout to a collector
export default LoggingConfig({ file: false });
```
