---
title: init_simple
summary: Initialize logging with a single endpoint filtered by log level.
url: https://www.fastly.com/documentation/reference/compute/sdks/cpp/fastly/log/fn.init_simple/
---

**Kind:** Function  
**Module:** [log](https://www.fastly.com/documentation/reference/compute/sdks/cpp/fastly/log/)  
**Package:** compute-sdk-cpp 0.7.0

Initialize logging with a single endpoint filtered by log level.

For advanced configuration, see the [`LoggerBuilder`](https://www.fastly.com/documentation/reference/compute/sdks/cpp/fastly/log/class.LoggerBuilder/) class, and the module-level documentation.

_Overload 1 of 4_

```cpp
void fastly::log::init_simple(Endpoint endpoint, LogLevelFilter level)
```

**Source:** https://github.com/fastly/compute-sdk-cpp/blob/ff911e47be2f319e83a9cde960d2c3c5db534280/include/fastly/log.h#L460

Initialize logging with a single endpoint filtered by log level.

For advanced configuration, see the [`LoggerBuilder`](https://www.fastly.com/documentation/reference/compute/sdks/cpp/fastly/log/class.LoggerBuilder/) class, and the module-level documentation.

**Parameters**

- `endpoint`: `Endpoint`
- `level`: `LogLevelFilter`

**Returns**

`void`

```cpp
fastly::log::init_simple("my_endpoint", fastly::log::LogLevelFilter::Warn);
fastly::log::warn("This will be written to my_endpoint...");
fastly::log::info("...but this won't");
```

_Overload 2 of 4_

```cpp
void fastly::log::init_simple(std::string_view endpoint, LogLevelFilter level)
```

**Source:** https://github.com/fastly/compute-sdk-cpp/blob/ff911e47be2f319e83a9cde960d2c3c5db534280/include/fastly/log.h#L461

**Parameters**

- `endpoint`: `std::string_view`
- `level`: `LogLevelFilter`

**Returns**

`void`

_Overload 3 of 4_

```cpp
void fastly::log::init_simple(Endpoint endpoint)
```

**Source:** https://github.com/fastly/compute-sdk-cpp/blob/ff911e47be2f319e83a9cde960d2c3c5db534280/include/fastly/log.h#L462

**Parameters**

- `endpoint`: `Endpoint`

**Returns**

`void`

_Overload 4 of 4_

```cpp
void fastly::log::init_simple(std::string_view endpoint)
```

**Source:** https://github.com/fastly/compute-sdk-cpp/blob/ff911e47be2f319e83a9cde960d2c3c5db534280/include/fastly/log.h#L463

**Parameters**

- `endpoint`: `std::string_view`

**Returns**

`void`
