Git Product home page Git Product logo

acmesyslog's Introduction

AcmeSyslog

A multi-output Arduino system logging library for the ESP8266/ESP32.

This is a library which provides the ability to log simultaneously to the serial console and Syslog using standard syslog format. And arbitrary callback is also supported to allow a developer to send logs to a function of their choosing.

Local logging into a SPIFFS (or LittleFS) filesystem is not fully implemented. Contributions are desired.

There is a dependency on the arcao/Syslog library that should be removed at some point in the future. However, thanks to the author!

The library offers quite a few methods with mostly self-explanatory names.

PROTIP: Set your RTC for sweet timestamps

Constructors:
AcmeSyslog();
AcmeSyslog(int m);

Public methods:
void setMode(int m); 
int getMode(); 
void setService(String s);
String getService();
void setLogLevel(int t, int s, int f);
void setLogLevel(int l);
void setSerialLogLevel(int t);
int getSerialLogLevel();
void setSyslogLogLevel(int s);
int getSyslogLogLevel();
void setFileLogLevel(int f);
int getFileLogLevel();
void setCallbackLogLevel(int f);
int getCallbackLogLevel();
void setLogTimestamp(bool t); 
bool getLogTimestamp(); 
void setSerialSpeed(long s); 
long getSerialSpeed();
void setSyslogServer(const char* c, uint16_t p);
void setSyslogServer(IPAddress i, uint16_t p);
void setDeviceHostname(const char *h);
String getDeviceHostname();
void setAppName(const char* a);
String getAppName();
void configSyslog(const char* c, uint16_t p, const char* h, const char* a, int dp);
void setSyslogDefaultPriority(int db); 
void init();
void setSyslogActive(bool a);
bool getSyslogActive();
void activateSyslog();
void initSyslog();
void configSyslog();
void initFile();
void dumpFileLog();
void eraseFileLog(); 
void initSerial(int s); 
void logMsg(String s);
void logMsg(int l, String s);
void logf(int l, const char *fmt, ...);
void setCallback(void f(char *));

Version 0.3.2

acmesyslog's People

Contributors

ljheidel avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.