---
title: "workflows.ConfigureConsoleLogging"
description: "Configure the default slog logger to write workflow logs to standard output at the given level."
image: "https://tilebox.com/images/tilebox-docs-social-preview.png"
---

> Documentation Index
> Fetch the complete documentation index at: https://tilebox.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# workflows.ConfigureConsoleLogging

import { Fragment } from "astro/jsx-runtime";

import ApiReference from "@docs/components/ApiReference.astro";

import ParamField from "@docs/components/ParamField.astro";

```go
func ConfigureConsoleLogging(level slog.Level)
```

Configure the default `slog` logger to write workflow logs to standard output at the given level.

The console handler composes with the Tilebox log exporter installed by `workflows.NewClient()`, so logs can be sent to Tilebox and printed locally. Calling `ConfigureConsoleLogging` more than once does not add duplicate console handlers.

## Parameters

**level**

type: slog.Level

required: true

The minimum log level to print to the console.

## Returns

Nothing.

<h2 id="request-example">Usage example</h2>

```go
import (
    "context"
    "log/slog"

    "github.com/tilebox/tilebox-go/workflows/v1"
)

func main() {
    ctx := context.Background()
    workflows.ConfigureConsoleLogging(slog.LevelDebug)

    client := workflows.NewClient()
    runner, err := client.NewTaskRunner(ctx)
    if err != nil {
        slog.ErrorContext(
            ctx,
            "failed to create runner",
            slog.Any("error", err),
        )
        return
    }

    if err := runner.RunForever(ctx); err != nil {
        slog.ErrorContext(
            ctx,
            "runner failed",
            slog.Any("error", err),
        )
    }
}
```

Source: https://tilebox.com/docs/api-reference/go/workflows/ConfigureConsoleLogging/index.mdx
