Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reports|Logging - standardisation #61

Open
Chrico opened this issue Apr 7, 2016 · 1 comment
Open

Reports|Logging - standardisation #61

Chrico opened this issue Apr 7, 2016 · 1 comment

Comments

@Chrico
Copy link
Contributor

Chrico commented Apr 7, 2016

Currently the following classes:

  • Inpsyde\SearchReplace\Database\Exporter
  • Inpsyde\SearchReplace\Database\Importer
  • Inpsyde\SearchReplace\Database\Replace

returning "report"-arrays in their methods. The response has - most of the time - following fields:

  • errors - NULL|\WP_Error|array
  • changes - string|array|null
  • tables - string|int|null|array
  • table_name - string
  • changes_count - int
  • filename - string
  • timing

  1. We should standardize the logging (reports) within these classes (e.G. Monolog). Most of the information is not used anymore and only important when an error occures. On error --> generate log file which can be downloaded - printed out (maybe can be disabled/activated via setting).
  2. The methods should return a success/fail state (true/false) for better testing. The page-classes can print out the correct notices.
  3. The classes should implement methods to grant access to generated reports for error handling (see 1.).
@Chrico Chrico changed the title Reports - standardisation Reports|Logging - standardisation Apr 7, 2016
@derpixler
Copy link
Contributor

@Chrico ich hatte schon einen Überlegung hier zu angestellt aber diese wieder zurückgesetzt.
Unter inc/Service/Notifyer.php & inc/Service/NotifyerInterface.php

https://github.com/inpsyde/search-and-replace/tree/c51e5030e28aae0bfdf322ecc3d262a6217a1950/inc/Service

@derpixler derpixler modified the milestone: 3.2.0 Apr 25, 2016
@bueltge bueltge removed this from the 3.2.0 milestone Nov 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants