aboutsummaryrefslogtreecommitdiff
path: root/syslogd
AgeCommit message (Collapse)Author
2018-09-01usyslogd: fix getopt argumentsDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-09-01Add tiny klogd implementationDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-08-23Normalize syslog message line endingsDavid Oberhollenzer
Most syslog messages have a line feed at the end, but some don't. This patch removes trailing spaces from all syslog messages that have one and always adds a line feed in the logging back end. Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-08-20usyslogd: minor header restructuring/file structure cleanupDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-08-20usyslogd: chroot into log dir and drop privilegesDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-08-20usyslogd: merge log files for the same serviceDavid Oberhollenzer
If a service provides an identifier string, write all messages for that service itno a file named after that identifier instread of splitting it up by facility ID in a sub directory. This is supposed to cleanup and simplify the clutter created in /var/log. Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-08-19usyslogd: report error if file operation failsDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-08-16usyslogd: at least create files/sockets relative to prefix pathDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-08-16usyslogd: more control over log rotate behaviour, command line processingDavid Oberhollenzer
- Add more fine grained control over how log rotation is supposed to behave - Add command line option processing to usyslogd - Expose log rotation control via command line switches - Add default values to usyslogd service for pygos use case Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-08-16usyslogd: keep track of log file sizeDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-08-16Implement simple log rotationDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-08-16usyslogd: create abstraction for log stream managementDavid Oberhollenzer
This commit seperates the formating and printing of log messages to files more cleanly from the message pump that retrieves the log messages. At a later point, other backends could be added more easiyl (e.g. forward the log message to some server). Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-08-13usyslogd: cleanup log file filename handlingDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-06-17usyslogd: store logs in subdirectory based on service identifierDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-06-17usyslogd: do logfile lookup by facility numberDavid Oberhollenzer
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-06-11[usyslogd] split off syslog parsingDavid Oberhollenzer
- Add proto.{h,c} for parsing of syslog message - Also parse time stamp in addition to priority Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
2018-06-11Add minimalistic syslog daemonDavid Oberhollenzer
For now this daemon simply dumps all syslog messages into seperate log files and doesn't do much parsing. Since the messages are readable ASCII anyway, this should not be to much of a problem and sufficient for debugging. Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>