Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow multiple outputs #5

Open
sle118 opened this issue Feb 22, 2017 · 3 comments
Open

Allow multiple outputs #5

sle118 opened this issue Feb 22, 2017 · 3 comments
Assignees
Milestone

Comments

@sle118
Copy link

sle118 commented Feb 22, 2017

@arcao

I would like to suggest a feature for this project.

Given that it might be interesting to be able retrieve logs that might have been created while a device didn't have access to the network or while the syslog server was down, it would be nice to offer an option to have a buffer page of a predetermined size and periodically rotate it. In order to minimize the impact to the memory, the logs could be written to a SPIFFS file. Maybe this is an overkill for the flash memory, I don't know what sort of abuse it can sustain in terms of write/erase cycles.

Please let me know your thoughts.

@arcao arcao self-assigned this Mar 7, 2017
@arcao arcao added this to the Version 3.0.0 milestone Apr 17, 2017
@arcao
Copy link
Owner

arcao commented Apr 17, 2017

👍 I like this idea. More appenders like UdpSyslogAppender, BsdUdpSyslogAppender, PrinterSyslogApender, FileSyslogAppender, etc.

and usage like:

// define
UdpSyslogAppender udpAppender(udpClient, SYSLOG_SERVER, SYSLOG_PORT, DEVICE_HOSTNAME);
PrinterSyslogApender serialAppender(Serial);
Syslog syslog(APP_NAME, LOG_KERN, udpAppender, serialAppender);

// and use
syslog.log(LOG_INFO, "This is info log message");

@sle118
Copy link
Author

sle118 commented Apr 19, 2017

Would it be an Overkill to actually have the appenders register with delegates? This would allow runtime flexibility of adding and removing appenders.

Aside from this, thanks for including it as a milestone!

@kluzzebass
Copy link

What you guys are very close to describing is a generic logging service (like log4j), in which syslog is merely one of many appenders, along with Serial, File, etc.

Several of these exist (albeit in various embryonic stages), but they all seem to fall short of actually being flexible enough to also handle syslogging.

Perhaps version 3 of this library will be the logging framework we've all been looking for?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants