Enhancement #2652

Clear event log format

Added by Davide Principi almost 6 years ago. Updated almost 6 years ago.

Status:CLOSEDStart date:
Priority:LowDue date:
Assignee:-% Done:

100%

Category:nethserver-lib
Target version:v6.5-rc1
Resolution: NEEDINFO:No

Description

The current event log format is difficult to read. i.e.:
  • the event name is printed in line Processing event... at the beginning
  • action name is printed at the begin and at the end of action execution
  • action exit status, elapsed time event name are printed in an encoded form (pipe | separated field values, as esmith::DB)

The log format must report the event and action names on each line. Failed actions and event are important: they must be easy to find with and without grep / string matching.

Associated revisions

Revision 65f6ae7d
Added by Giacomo Sanchietti almost 6 years ago

event.pm: clear event log format. Refs #2652

History

#1 Updated by Giacomo Sanchietti almost 6 years ago

  • Priority changed from Normal to Low

#2 Updated by Giacomo Sanchietti almost 6 years ago

  • Status changed from NEW to TRIAGED
  • % Done changed from 0 to 20

#3 Updated by Giacomo Sanchietti almost 6 years ago

  • Status changed from TRIAGED to ON_DEV
  • Assignee set to Giacomo Sanchietti
  • % Done changed from 20 to 30

#4 Updated by Giacomo Sanchietti almost 6 years ago

  • Status changed from ON_DEV to MODIFIED
  • % Done changed from 30 to 60

Each event and actions will print its own exit status (SUCCESS or FAILED).
Removed start and end time of actions.

#5 Updated by Giacomo Sanchietti almost 6 years ago

  • Status changed from MODIFIED to ON_QA
  • Assignee deleted (Giacomo Sanchietti)
  • % Done changed from 60 to 70
Packages in nethserver-testing:
  • nethserver-lib-2.0.0-1.0git65f6ae7d.ns6.noarch.rpm
Test case
  • Check log for success events
  • Create a failing action, execute the event and check the log

NOTE Update Developer manual before closing this issue

#6 Updated by Alessio Fattorini almost 6 years ago

Check log for success events ok
Feb 13 19:34:47 botolo esmith::event503: Action: /etc/e-smith/events/user-create/S04user-create-unix SUCCESS [1.255055]
Feb 13 19:34:48 botolo esmith::event503: Updated 'user must change password at next logon' for BOTOLO\massimo to yes
Feb 13 19:34:48 botolo esmith::event503: Action: /etc/e-smith/events/user-create/S20nethserver-samba-user-create SUCCESS [0.857394]
Feb 13 19:34:48 botolo esmith::event503: Action: /etc/e-smith/events/user-create/S25count-active-user-accounts SUCCESS [0.080385]

_
Create a failing action, execute the event and check the log_ OK

Feb 13 19:41:36 botolo esmith::event1336: Arresto di amavisd: drop_priv: No such username: amavis
Feb 13 19:41:36 botolo esmith::event1336: [FALLITO]#015
Feb 13 19:41:36 botolo esmith::event1336:
Feb 13 19:41:36 botolo esmith::event1336: Avvio di amavisd: drop_priv: No such username: amavis
Feb 13 19:41:36 botolo esmith::event1336: [FALLITO]#015
Feb 13 19:41:36 botolo esmith::event1336:
Feb 13 19:41:36 botolo esmith::event1336: [WARNING] service amavisd restart failed!
Feb 13 19:41:37 botolo esmith::event1336: [INFO] service postfix reload
Feb 13 19:41:37 botolo esmith::event1336: Ricarica di postfix in corso: [ OK ]#015
Feb 13 19:41:37 botolo esmith::event1336: Action: /etc/e-smith/events/actions/adjust-services FAILED: 1 [2.067776]
Feb 13 19:41:37 botolo esmith::event1336: Event: domain-delete FAILED

#7 Updated by Alessio Fattorini almost 6 years ago

  • Status changed from ON_QA to VERIFIED
  • % Done changed from 70 to 90

It's not clear for me how update Developer Manual.

#8 Updated by Davide Principi almost 6 years ago

  • Status changed from VERIFIED to CLOSED
  • % Done changed from 90 to 100

#9 Updated by Davide Principi almost 6 years ago

In nethserver-updates:
nethserver-release-6.5-4.ns6.rc1.noarch.rpm
nethserver-devbox-1.4.0-1.ns6.noarch.rpm
nethserver-backup-data-1.0.9-1.ns6.noarch.rpm
nethserver-base-2.1.0-1.ns6.noarch.rpm
nethserver-directory-2.0.1-1.ns6.noarch.rpm
nethserver-firewall-base-1.1.0-1.ns6.noarch.rpm
nethserver-hosts-1.0.7-1.ns6.noarch.rpm
nethserver-httpd-2.3.0-1.ns6.noarch.rpm
nethserver-httpd-admin-1.2.1-1.ns6.noarch.rpm
nethserver-hylafax-1.0.5-1.ns6.noarch.rpm
nethserver-ibays-2.0.3-1.ns6.noarch.rpm
nethserver-lib-2.0.1-1.ns6.noarch.rpm
nethserver-mail-server-1.6.1-1.ns6.noarch.rpm
nethserver-nethgui-1.4.0-1.ns6.noarch.rpm
nethserver-ntopng-1.1.2-1.ns6.noarch.rpm
nethserver-nut-1.0.7-1.ns6.noarch.rpm
nethserver-openssh-1.0.5-1.ns6.noarch.rpm
nethserver-roundcubemail-0.0.2-1.ns6.noarch.rpm
nethserver-samba-1.4.2-1.ns6.noarch.rpm
nethserver-shorewall-1.0.4-1.ns6.noarch.rpm
nethserver-sogo-thunderbird-1.1.1-1.ns6.noarch.rpm
nethserver-vpn-1.1.2-1.ns6.noarch.rpm
sogo-frontends-1.3.0-1.ns6.noarch.rpm

Also available in: Atom PDF