# Log

- Module: [Aspire.Hosting](/reference/api/go/aspire.hosting.md)
- Version: `17.0.0`
- Kind: `method`
- Defined on: [`Logger`](/reference/api/go/aspire.hosting/logger.md)
- Source: [GitHub](https://github.com/microsoft/aspire/tree/2d325b13709752ba6d9a943635c5e2940a2530c0)

Logs a message with a specified log level.

## Definition

```go
func (Logger) Log(
    level string,
    message string,
) error
```

## Parameters

- `level` (`string`)
- `message` (`string`)

## Returns

`error`

Returns `error`.

## Applies to

- [`Logger`](/reference/api/go/aspire.hosting/logger.md)
