Commit Graph

8 Commits

Author SHA1 Message Date
Alessio Treglia
0ed0201b90 Use d-neg condition to prevent unexpected failures 2015-07-01 19:48:09 +01:00
Alessio Treglia
91c691a806 Create dokku's /var/log/dokku/ private namespace
Rename dokku.log to events.log.
Refresh tests accordingly.
2015-07-01 18:25:11 +01:00
Alessio Treglia
69aba06361 Handle log rotation
As requested by @josegonzalez.
2015-06-28 23:25:50 +01:00
Alessio Treglia
16e4001677 Restart rsyslog once installed
Seems that a mere reload doesn't work.
2015-06-27 10:20:07 +01:00
Alessio Treglia
8e7916131c Double quote $@ in plugins/20_events/install too 2015-06-26 15:25:57 +01:00
Alessio Treglia
f5e213e390 Add missing DOKKU_RSYSLOG_FILTER in install script
It had gone lost while porting the original 3rd party plugin.
2015-06-26 15:12:55 +01:00
Alessio Treglia
e9a73442e2 Fix missing 'fi' in plugins/20_events/install 2015-06-26 15:11:42 +01:00
Alessio Treglia
783bb02b2c Implement events logging feature
Record events (i.e. pluginhook's calls) as syslog entries and
provide a shortcut command to display the last part of the log
file.

A brief summary of the changes follows:

dokku:
 - New DOKKU_EVENTS_LOGFILE envvar to hold logfile location.

plugins/20_events/commands:
 - events output log entries, a tail's follow-like mode is
   provided too.
 - events:[on|off] enables/disables logging.
 - events:list lists events that are logged.

plugins/20_events/hook:
 - Generic hook that writes log entries. All the events are
   registered via symlink to this script.

plugins/common/functions:
 - dokku_log_event() writes log entries via logger.
 - dokku_log_pluginhook_call() formats log entries and writes
   them via dokku_log_event().
2015-06-26 14:47:18 +01:00