Project

General

Profile

Segnalazione #743

Log azioni utente

Added by Enrico Zini over 5 years ago. Updated about 5 years ago.

Status:
Chiuso
Priority:
Normale
Assignee:
Target version:
Start date:
02/19/2019
Due date:
% Done:

0%

Estimated time:
Resolution:

Description

Logging delle azioni fatte dai vari utenti, a scopo di analytics per vedere le feature piú o meno usate

Associated revisions

Revision 7b1d1498 (diff)
Added by Enrico Zini over 5 years ago

Track operation sources. refs: #743

Revision a5183679 (diff)
Added by Enrico Zini over 5 years ago

Write operation log. refs: #743

Revision 2d5f4fc8 (diff)
Added by Enrico Zini over 5 years ago

Use a logger class, to make it easier to implement log rotation in the future. refs: #743

Revision ddee1683 (diff)
Added by Elena Grandi over 5 years ago

Use a tempfile for the operation log during tests. refs: #743

Revision 3383c75e (diff)
Added by Enrico Zini over 5 years ago

Started a test suite for ops. refs: #743

Revision 4cbe3f2d (diff)
Added by Enrico Zini over 5 years ago

Added slots to all Event classes, to prevent setting mistyped attributes. refs: #743

Revision bb15e49e (diff)
Added by Enrico Zini over 5 years ago

Implemented disabling a data source from config. refs: #743

Revision 1f7f97e1 (diff)
Added by Enrico Zini over 5 years ago

Turn all stores ip/name/mac resolution functions into coroutines. refs: #743

Revision a6048508 (diff)
Added by Enrico Zini over 5 years ago

Only run the chaos data source if debug is True. refs: #743

Revision 60269798 (diff)
Added by Enrico Zini over 5 years ago

Cleaned up / expanded TestManagerMixin. refs: #743

Revision 457aa163 (diff)
Added by Enrico Zini over 5 years ago

Test AddGroup and DelGroup. refs: #743

Revision 2c0a8143 (diff)
Added by Enrico Zini over 5 years ago

Test that OperationLog does not fail if the log directory does not exist. refs: #743

History

#1

Updated by Elena Grandi over 5 years ago

Tenere traccia:

  • delle azioni richiamate dall'interfaccia;
  • delle azioni svolte dal backend
#2

Updated by Enrico Zini over 5 years ago

  • Assignee set to Enrico Zini
#3

Updated by Enrico Zini over 5 years ago

  • Status changed from Nuovo to In elaborazione
#4

Updated by Enrico Zini over 5 years ago

  • Status changed from In elaborazione to Commenti
  • Assignee changed from Enrico Zini to Elena Grandi

Ora le Operation vengono eseguite tramite il metodo Manager.execute, che le logga in un file un-json-per-riga.

Non ho implementato supporto per ruotare il file di log, che lascierei a un futuro in cui si ha un'idea piú chiara di come gestire reload dell'applicazione e rotazione dei suoi log in generale. Ho però predisposto il codice per implementare rotazione, incapsulando il logging in una OperationLog.

Ho aggiunto Operation.source per tracciare il punto dell'interfaccia in cui è stata richiesta un'operazione. In futuro, potremo aggiungerci anche il nome dell'utente e quant'altro possa servire.

#5

Updated by Elena Grandi over 5 years ago

Su una macchina dove non esiste /var/log/fuss-manager/ i test fallivano per l'assenza della directory.

Ho cambiato i test per usare un tempfile perché possano girare in ambienti isolati (CI o simili).

Può essere utile (prima del merge?) aggiungere dei test che verifichino che l'errore specifico (configurazione in cui il file dei log non sia apribile per vari motivi) sia gestito?

#6

Updated by Elena Grandi over 5 years ago

  • Assignee changed from Elena Grandi to Enrico Zini
#7

Updated by Enrico Zini over 5 years ago

  • Assignee changed from Enrico Zini to Elena Grandi

Fatto, e testato anche un po' meglio le ops già che c'ero

#8

Updated by Elena Grandi about 5 years ago

  • Status changed from Commenti to Chiuso
  • Assignee changed from Elena Grandi to Enrico Zini

Mergiato in master

Also available in: Atom PDF