Commit Graph

14 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
89d1acaa38 Revert "Fix double negative statement"
This reverts commit 54ed3c1f2b.
2015-07-01 19:47:38 +01:00
Alessio Treglia
54ed3c1f2b Fix double negative statement
This is mostly for consistency with its own install script.
2015-07-01 19:20:53 +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
fb5d3a06f0 Attempt to fix SC2046 2015-06-26 18:01:40 +01:00
Alessio Treglia
da3b00a894 Get rid of cruft leftover 2015-06-26 17:57:43 +01:00
Alessio Treglia
466670d804 Quote `find' statement to prevent word splitting
This should fix ShellCheck SC2046 error.
2015-06-26 16:37:01 +01:00
Alessio Treglia
8e7916131c Double quote $@ in plugins/20_events/install too 2015-06-26 15:25:57 +01:00
Alessio Treglia
a858bc8f81 Double quote $@ array expansions 2015-06-26 15:18:38 +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