syslog device(client) library http://mbed.org/users/okini3939/notebook/logger/

Files at this revision

API Documentation at this revision

Comitter:
okini3939
Date:
Sat Apr 16 15:34:45 2011 +0000
Parent:
0:7d428b9b277e
Commit message:

Changed in this revision

logger.cpp Show annotated file Show diff for this revision Revisions of this file
logger.h Show annotated file Show diff for this revision Revisions of this file
--- a/logger.cpp	Sat Apr 16 08:48:55 2011 +0000
+++ b/logger.cpp	Sat Apr 16 15:34:45 2011 +0000
@@ -12,11 +12,6 @@
 
 static const char mstr[12][4] = {"May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"};
 
-/**
- * @brief init
- * @param p_eth EthernetNetIf class
- * @param host syslog collctor (server)
- */
 logger::logger (EthernetNetIf *p_eth, char *host) {
     IpAddr addr;
     char name[20];
@@ -27,12 +22,6 @@
     logger(p_eth, host, name);
 }
 
-/**
- * @brief init
- * @param p_eth EthernetNetIf class
- * @param host syslog collctor (server) hostname or IP address
- * @param myname My hostname or IP address
- */
 logger::logger (EthernetNetIf *p_eth, char *host, char *myname) {
     int ip0, ip1, ip2, ip3;
 
@@ -53,22 +42,10 @@
     udpsock->bind(Host(eth->getIp(), LOG_UDPPORT));
 }
 
-/**
- * @brief Send the message
- * @param tag Process name
- * @param content Message
- */
 void logger::send (char *tag, char *content) {
     send(LOG_NOTICE, LOG_USER, tag, content);
 }
 
-/**
- * @brief Send the message
- * @param sev Severity
- * @param fac Facility
- * @param tag Process name
- * @param content Message
- */
 void logger::send (LOG_SEVERITY sev, LOG_FACILITY fac, char *tag, char *content) {
     int pri, len;
     time_t ctTime;
--- a/logger.h	Sat Apr 16 08:48:55 2011 +0000
+++ b/logger.h	Sat Apr 16 15:34:45 2011 +0000
@@ -62,16 +62,35 @@
     LOG_LOCAL7    = 23,    /* reserved for local use */
 };
 
-/**
- * @class syslog
- * @brief syslog device (sender/client)
+/** brief syslog device (sender/client)
  */
 class logger {
 public:
+    /** init logger class
+     * @param p_eth EthernetNetIf class
+     * @param host syslog collctor (server)
+     */
     logger (EthernetNetIf *, char *); 
+
+    /** init logger class
+     * @param p_eth EthernetNetIf class
+     * @param host syslog collctor (server) hostname or IP address
+     * @param myname My hostname or IP address
+     */
     logger (EthernetNetIf *, char *, char *);
 
+    /** Send the message
+     * @param tag Process name
+     * @param content Message
+     */
     void send (LOG_SEVERITY, LOG_FACILITY, char *, char *);
+
+    /** Send the message
+     * @param sev Severity
+     * @param fac Facility
+     * @param tag Process name
+     * @param content Message
+     */
     void send (char *, char *);
 
 private: