arcao / Syslog

An Arduino library for logging to Syslog server in IETF format (RFC 5424) and BSD format (RFC 3164)
MIT License
119 stars 48 forks source link

fixes #1

Closed sticilface closed 7 years ago

sticilface commented 7 years ago

This adds the implementation for Syslog &Syslog::server(IPAddress ip, uint16_t port) which is missing. adds a check to use _ip if _server is null adds a new method to use PSTR() within Syslog & vlogf_P(uint16_t pri, PGM_P formatP, ...) this saves RAM and is quite cool.

sticilface commented 7 years ago

I used this post to fix the vsnprintf_P on the other platform but can't test if it actually works https://github.com/bportaluri/WiFiEsp/pull/27

arcao commented 7 years ago

This adds the implementation for Syslog &Syslog::server(IPAddress ip, uint16_t port) which is missing. adds a check to use _ip if _server is null

I will fix it in version 2.1.0

adds a new method to use PSTR() within Syslog & vlogf_P(uint16_t pri, PGM_P formatP, ...) this saves RAM and is quite cool.

Yes, I've think about the same. I will definitely add it to version 2.1.0. But your implementation should be separated into two methods: logf_P(uint16_t pri, PGM_P formatP, ...) and vlogf_P(uint16_t pri, PGM_P formatP, va_list args). The v there means va_list.

arcao commented 7 years ago

I made my own implementation of logf_P anyway thanks for PR.

sticilface commented 7 years ago

no problem :)