esphome-api-client 0.5.0
Modern C++17 client for the ESPHome native API (plaintext + Noise)
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
esphome::api::LogStream Class Reference

Subscribes to and surfaces the device's log stream. More...

#include <log_stream.hpp>

Inheritance diagram for esphome::api::LogStream:
Inheritance graph
[legend]
Collaboration diagram for esphome::api::LogStream:
Collaboration graph
[legend]

Public Types

using Handler = std::function< void(const LogEntry &)>
 

Public Member Functions

 LogStream (Client &client)
 
void subscribe (LogLevel level, Handler handler, bool dump_config=false)
 Begin streaming logs at level or more severe.
 
- Public Member Functions inherited from esphome::api::Subsystem
 Subsystem (Client &client)
 

Additional Inherited Members

- Protected Attributes inherited from esphome::api::Subsystem
Clientclient_
 

Detailed Description

Subscribes to and surfaces the device's log stream.

Member Typedef Documentation

◆ Handler

using esphome::api::LogStream::Handler = std::function<void(const LogEntry&)>

Constructor & Destructor Documentation

◆ LogStream()

esphome::api::LogStream::LogStream ( Client client)
inlineexplicit

Member Function Documentation

◆ subscribe()

void esphome::api::LogStream::subscribe ( LogLevel  level,
Handler  handler,
bool  dump_config = false 
)

Begin streaming logs at level or more severe.

dump_config asks the device to also dump its configuration. handler receives each line.


The documentation for this class was generated from the following file: