Generates reports based on the logs from scheb/tombstone
Report generation for the Tombstones created with the scheb/tombstone library.
Install via composer
$ composer require scheb/tombstone-analyzer
Composer automatically creates an executable binary
Provide a YAML config file to the tombstone-analyzer. Providing the config file is optional, by default it looks for a
tombstone.yml in the current working directory.
$ tombstone -c tombstone.yml
Relative paths in the configuration file are resolved relative to the config file's location.
The tool uses symfony/finder to scan the source directory, so have a look at its documentation to understand filter options.
source: directories: - src logs: directory: logs
All configuration options:
source: # Required, Where your source files are located (see finder's "in" option) directories: - src # Exclude patterns relative to the ones defined in "directories" (see finder's "exclude" option) excludes: - tests # Name pattern to be included (see finder's "name" option) names: - "*.php" # Name pattern to be excluded (see finder's "notName" option) notNames: - "*.js" # Optional, the root directory is used to make paths from the scanned sources relative. This is important, if you made # the paths in your logs relative to a root directory. rootDir: root # One of the logs providers must be set, either "directory" or "custom" logs: # Use the log file provider. This is where log files from AnalyzerLogHandler are located. directory: logs # Use your own log provider. You have to configure the file and class name. # Has to implement Scheb\Tombstone\Analyzer\Log\LogReaderInterface custom: file: "srLogReaderInterfaceder.php" class: 'Scheb\Tombstone\Analyzer\TestApplication\Tombstone\LogProvider' # Report generation options report: php: report/tombstone-report.php # Generate a PHP report dump here html: report # Generate a HTML report here console: true # Display report on the console (default: false)
You're welcome to contribute to this library by creating a pull requests or feature request in the issues section. For pull requests, please follow these guidelines:
- Symfony code style
- PHP7.1 type hints for everything (including: return types,
void, nullable types)
- Please add/update test cases
- Test methods should be named
To run the test suite install the dependencies with
composer install and then execute
Thanks to Sebastian Bergmann for letting me re-use parts of his code and the template files.
This library is available under the MIT license.