ESPHome 2025.5.0
Loading...
Searching...
No Matches
esphome::syslog::Syslog Class Reference

#include <esphome_syslog.h>

Inheritance diagram for esphome::syslog::Syslog:
esphome::Component esphome::Parented< udp::UDPComponent >

Public Member Functions

 Syslog (int level, time::RealTimeClock *time)
 
void setup () override
 
void set_strip (bool strip)
 
void set_facility (int facility)
 
- Public Member Functions inherited from esphome::Component
virtual void loop ()
 This method will be called repeatedly.
 
virtual void dump_config ()
 
virtual float get_setup_priority () const
 priority of setup().
 
float get_actual_setup_priority () const
 
void set_setup_priority (float priority)
 
virtual float get_loop_priority () const
 priority of loop().
 
void call ()
 
virtual void on_shutdown ()
 
virtual void on_safe_shutdown ()
 
uint32_t get_component_state () const
 
virtual void mark_failed ()
 Mark this component as failed.
 
void mark_failed (const char *message)
 
bool is_failed () const
 
bool is_ready () const
 
virtual bool can_proceed ()
 
bool status_has_warning () const
 
bool status_has_error () const
 
void status_set_warning (const char *message="unspecified")
 
void status_set_error (const char *message="unspecified")
 
void status_clear_warning ()
 
void status_clear_error ()
 
void status_momentary_warning (const std::string &name, uint32_t length=5000)
 
void status_momentary_error (const std::string &name, uint32_t length=5000)
 
bool has_overridden_loop () const
 
void set_component_source (const char *source)
 Set where this component was loaded from for some debug messages.
 
const char * get_component_source () const
 Get the integration where this component was declared as a string.
 
bool should_warn_of_blocking (uint32_t blocking_time)
 
- Public Member Functions inherited from esphome::Parented< udp::UDPComponent >
 Parented ()
 
 Parented (udp::UDPComponent *parent)
 
udp::UDPComponentget_parent () const
 Get the parent of this object.
 
void set_parent (udp::UDPComponent *parent)
 Set the parent of this object.
 

Protected Member Functions

void log_ (int level, const char *tag, const char *message) const
 
- Protected Member Functions inherited from esphome::Component
virtual void call_loop ()
 
virtual void call_setup ()
 
virtual void call_dump_config ()
 
void set_interval (const std::string &name, uint32_t interval, std::function< void()> &&f)
 Set an interval function with a unique name.
 
void set_interval (uint32_t interval, std::function< void()> &&f)
 
bool cancel_interval (const std::string &name)
 Cancel an interval function.
 
void set_retry (const std::string &name, uint32_t initial_wait_time, uint8_t max_attempts, std::function< RetryResult(uint8_t)> &&f, float backoff_increase_factor=1.0f)
 Set an retry function with a unique name.
 
void set_retry (uint32_t initial_wait_time, uint8_t max_attempts, std::function< RetryResult(uint8_t)> &&f, float backoff_increase_factor=1.0f)
 
bool cancel_retry (const std::string &name)
 Cancel a retry function.
 
void set_timeout (const std::string &name, uint32_t timeout, std::function< void()> &&f)
 Set a timeout function with a unique name.
 
void set_timeout (uint32_t timeout, std::function< void()> &&f)
 
bool cancel_timeout (const std::string &name)
 Cancel a timeout function.
 
void defer (const std::string &name, std::function< void()> &&f)
 Defer a callback to the next loop() call.
 
void defer (std::function< void()> &&f)
 Defer a callback to the next loop() call.
 
bool cancel_defer (const std::string &name)
 Cancel a defer callback using the specified name, name must not be empty.
 

Protected Attributes

int log_level_
 
time::RealTimeClocktime_
 
bool strip_ {true}
 
int facility_ {16}
 
- Protected Attributes inherited from esphome::Component
uint32_t component_state_ {0x0000}
 State of this component.
 
float setup_priority_override_ {NAN}
 
const char * component_source_ {nullptr}
 
uint32_t warn_if_blocking_over_ {WARN_IF_BLOCKING_OVER_MS}
 
std::string error_message_ {}
 
- Protected Attributes inherited from esphome::Parented< udp::UDPComponent >
udp::UDPComponentparent_
 

Detailed Description

Definition at line 11 of file esphome_syslog.h.

Constructor & Destructor Documentation

◆ Syslog()

esphome::syslog::Syslog::Syslog ( int level,
time::RealTimeClock * time )
inline

Definition at line 13 of file esphome_syslog.h.

Member Function Documentation

◆ log_()

void esphome::syslog::Syslog::log_ ( int level,
const char * tag,
const char * message ) const
protected

Definition at line 27 of file esphome_syslog.cpp.

◆ set_facility()

void esphome::syslog::Syslog::set_facility ( int facility)
inline

Definition at line 16 of file esphome_syslog.h.

◆ set_strip()

void esphome::syslog::Syslog::set_strip ( bool strip)
inline

Definition at line 15 of file esphome_syslog.h.

◆ setup()

void esphome::syslog::Syslog::setup ( )
overridevirtual

Reimplemented from esphome::Component.

Definition at line 22 of file esphome_syslog.cpp.

Field Documentation

◆ facility_

int esphome::syslog::Syslog::facility_ {16}
protected

Definition at line 23 of file esphome_syslog.h.

◆ log_level_

int esphome::syslog::Syslog::log_level_
protected

Definition at line 19 of file esphome_syslog.h.

◆ strip_

bool esphome::syslog::Syslog::strip_ {true}
protected

Definition at line 22 of file esphome_syslog.h.

◆ time_

time::RealTimeClock* esphome::syslog::Syslog::time_
protected

Definition at line 21 of file esphome_syslog.h.


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