Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
sdk:log-to-syslog [2016/09/28 12:43]
fachet [The Script]
sdk:log-to-syslog [2016/09/30 13:47]
juraschek [The Script]
Line 61: Line 61:
   ​   ​
   ​   ​
-<code c stus-to-syslog.are>​+<code c status-to-syslog.are>​
 /* DESC: A Script that can be used for a longtime logging of a NetModule Wireless Router. ​ /* DESC: A Script that can be used for a longtime logging of a NetModule Wireless Router. ​
  * The upper part of the script is the logger template. The lower part is the real programm, where you describe the settings and workflow.  * The upper part of the script is the logger template. The lower part is the real programm, where you describe the settings and workflow.
Line 95: Line 95:
             }             }
         }         }
-        nb_syslog("​%s", ​line);+        ​MAX_LINE_LEN=180;​ 
 +        for(i=0; i<​strlen(line);​i=i+MAX_LINE_LEN) { 
 +                subline=substr(line,​i,​MAX_LINE_LEN);​ 
 +                ​nb_syslog("​%s", ​subline); 
 +        } 
         return 0;         return 0;
     }     }
Line 119: Line 124:
  
 do { do {
-  
     l.logNow();     l.logNow();
     sleep(mode);​     sleep(mode);​