Opened 9 years ago

Closed 4 years ago

#4898 closed enhancement (obsolete)

syslog-ng as replacement for busybox's logging facility

Reported by: jake1981 <oskari.rauta@…> Owned by: developers
Priority: normal Milestone: Features Paradise
Component: packages Version:
Keywords: Cc:


syslog-ng instead of busybox's internal logging facility works just great, but if you want to make syslog-ng a replacement for busybox's logging in openwrt - you will be needing some minor changes to it before it completely has replaced busybox logging..

1) syslog-ng is started as service number 50 - this is quite late, whilst busybox's logging starts with boot in number 5 if I remember correctly. And to log also messages during boot service, syslog-ng should be started even sooner, so service number 03 would suite these needs better. --- Check attachment syslog-ng.init

2) syslog-ng won't start properly with service number 03 (or any number, before boot service) because /var/log does not exist. We could create this directory from initscript's start - but as syslog-ng can be modified and we ALWAYS want logging directory to exist, even if user decided to change logs to be located somewhere else than /var/log we should use configuration setting create_dirs(yes); --- Check attachment syslog-ng.conf

3) Busybox's log is circular - syslog-ng also supports circular logging - you can limit it either by amount of lines kept in log, or by bytes. This should be enabled on default on openwrt. --- Check attachment syslog-ng.conf

4) To read log in openwrt, usually command logread is being used. Also luci web interface uses logread to pipe system log to web page. If you disable busybox's logging facilities - also logread will be lost and luci's system log doesn't display anything. Logread most propably is also being used on other scripts in openwrt and missing command will break some functionality. I have written a .sh script to replace busybox's logread - although, it doesn't parse syslog-ng.conf and therefore logfile always should be /var/log/messages. --- Check attachment logread

I have tested these, it works very well.

Attachments (3)

syslog-ng.conf (703 bytes) - added by jake1981 <oskari.rauta@…> 9 years ago.
syslog-ng.init (427 bytes) - added by jake1981 <oskari.rauta@…> 9 years ago.
logread (753 bytes) - added by jake1981 <oskari.rauta@…> 9 years ago.

Download all attachments as: .zip

Change History (8)

Changed 9 years ago by jake1981 <oskari.rauta@…>

Changed 9 years ago by jake1981 <oskari.rauta@…>

Changed 9 years ago by jake1981 <oskari.rauta@…>

comment:1 Changed 9 years ago by florian

Can you change syslog-ng makefile to replace the logread file with the syslog-ng aware one ?

comment:2 Changed 9 years ago by Maddes <maddes_trac@…>

Right now it does not compile for Marvell Orion, see #5618

comment:3 Changed 8 years ago by thepeople

  • Milestone set to Kamikaze Features Paradize

comment:4 Changed 7 years ago by anonymous

Reading the syslog-ng documentation; it does not seem to support circular logging.

comment:5 Changed 4 years ago by tripolar

  • Resolution set to obsolete
  • Status changed from new to closed

feel free to send a patch to the ml to implement this functionality. also try latest trunk. this bug will be closed for now.

Add Comment

Modify Ticket

as closed .
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.