---
title: llarp::ILogStream
summary: logger stream interface 

---

# llarp::ILogStream



logger stream interface 


`#include <logstream.hpp>`

Inherited by [llarp::AndroidLogStream](Classes/structllarp_1_1AndroidLogStream.md), [llarp::FileLogStream](Classes/structllarp_1_1FileLogStream.md), [llarp::OStreamLogStream](Classes/structllarp_1_1OStreamLogStream.md), [llarp::SysLogStream](Classes/structllarp_1_1SysLogStream.md), [llarp::apple::NSLogStream](Classes/structllarp_1_1apple_1_1NSLogStream.md)

## Public Functions

|                | Name           |
| -------------- | -------------- |
| virtual | **[~ILogStream](Classes/structllarp_1_1ILogStream.md#function-~ilogstream)**() =default |
| virtual void | **[PreLog](Classes/structllarp_1_1ILogStream.md#function-prelog)**(std::stringstream & out, LogLevel lvl, std::string_view filename, int lineno, const std::string & nodename) const =0 |
| virtual void | **[Print](Classes/structllarp_1_1ILogStream.md#function-print)**(LogLevel lvl, std::string_view filename, const std::string & msg) =0 |
| virtual void | **[PostLog](Classes/structllarp_1_1ILogStream.md#function-postlog)**(std::stringstream & out) const =0 |
| virtual void | **[AppendLog](Classes/structllarp_1_1ILogStream.md#function-appendlog)**(LogLevel lvl, std::string_view filename, int lineno, const std::string & nodename, const std::string msg) |
| virtual void | **[ImmediateFlush](Classes/structllarp_1_1ILogStream.md#function-immediateflush)**() =0<br>A blocking call to flush to disk. Should only be called in rare circumstances.  |
| virtual void | **[Tick](Classes/structllarp_1_1ILogStream.md#function-tick)**(llarp_time_t now) =0<br>called every end of event loop tick  |

## Public Functions Documentation

### function ~ILogStream

```cpp
virtual ~ILogStream() =default
```


### function PreLog

```cpp
virtual void PreLog(
    std::stringstream & out,
    LogLevel lvl,
    std::string_view filename,
    int lineno,
    const std::string & nodename
) const =0
```


**Reimplemented by**: [llarp::FileLogStream::PreLog](Classes/structllarp_1_1FileLogStream.md#function-prelog), [llarp::AndroidLogStream::PreLog](Classes/structllarp_1_1AndroidLogStream.md#function-prelog), [llarp::SysLogStream::PreLog](Classes/structllarp_1_1SysLogStream.md#function-prelog), [llarp::OStreamLogStream::PreLog](Classes/structllarp_1_1OStreamLogStream.md#function-prelog), [llarp::apple::NSLogStream::PreLog](Classes/structllarp_1_1apple_1_1NSLogStream.md#function-prelog)


### function Print

```cpp
virtual void Print(
    LogLevel lvl,
    std::string_view filename,
    const std::string & msg
) =0
```


**Reimplemented by**: [llarp::AndroidLogStream::Print](Classes/structllarp_1_1AndroidLogStream.md#function-print), [llarp::apple::NSLogStream::Print](Classes/structllarp_1_1apple_1_1NSLogStream.md#function-print), [llarp::SysLogStream::Print](Classes/structllarp_1_1SysLogStream.md#function-print), [llarp::OStreamLogStream::Print](Classes/structllarp_1_1OStreamLogStream.md#function-print), [llarp::FileLogStream::Print](Classes/structllarp_1_1FileLogStream.md#function-print)


### function PostLog

```cpp
virtual void PostLog(
    std::stringstream & out
) const =0
```


**Reimplemented by**: [llarp::apple::NSLogStream::PostLog](Classes/structllarp_1_1apple_1_1NSLogStream.md#function-postlog), [llarp::AndroidLogStream::PostLog](Classes/structllarp_1_1AndroidLogStream.md#function-postlog), [llarp::FileLogStream::PostLog](Classes/structllarp_1_1FileLogStream.md#function-postlog), [llarp::SysLogStream::PostLog](Classes/structllarp_1_1SysLogStream.md#function-postlog), [llarp::OStreamLogStream::PostLog](Classes/structllarp_1_1OStreamLogStream.md#function-postlog)


### function AppendLog

```cpp
inline virtual void AppendLog(
    LogLevel lvl,
    std::string_view filename,
    int lineno,
    const std::string & nodename,
    const std::string msg
)
```


**Reimplemented by**: [llarp::FileLogStream::AppendLog](Classes/structllarp_1_1FileLogStream.md#function-appendlog)


### function ImmediateFlush

```cpp
virtual void ImmediateFlush() =0
```

A blocking call to flush to disk. Should only be called in rare circumstances. 

**Reimplemented by**: [llarp::apple::NSLogStream::ImmediateFlush](Classes/structllarp_1_1apple_1_1NSLogStream.md#function-immediateflush), [llarp::AndroidLogStream::ImmediateFlush](Classes/structllarp_1_1AndroidLogStream.md#function-immediateflush), [llarp::FileLogStream::ImmediateFlush](Classes/structllarp_1_1FileLogStream.md#function-immediateflush), [llarp::SysLogStream::ImmediateFlush](Classes/structllarp_1_1SysLogStream.md#function-immediateflush), [llarp::OStreamLogStream::ImmediateFlush](Classes/structllarp_1_1OStreamLogStream.md#function-immediateflush)


### function Tick

```cpp
virtual void Tick(
    llarp_time_t now
) =0
```

called every end of event loop tick 

**Reimplemented by**: [llarp::FileLogStream::Tick](Classes/structllarp_1_1FileLogStream.md#function-tick), [llarp::apple::NSLogStream::Tick](Classes/structllarp_1_1apple_1_1NSLogStream.md#function-tick), [llarp::AndroidLogStream::Tick](Classes/structllarp_1_1AndroidLogStream.md#function-tick), [llarp::SysLogStream::Tick](Classes/structllarp_1_1SysLogStream.md#function-tick), [llarp::OStreamLogStream::Tick](Classes/structllarp_1_1OStreamLogStream.md#function-tick)


-------------------------------

Updated on 2022-07-17 at 00:14:29 +0000