This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Last revision Both sides next revision | ||
sdk:log-to-syslog [2016/09/28 12:44] 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; | ||
} | } |