-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
Ready for push to github.
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,58 @@ | ||
language: php | ||
php: | ||
- '7.0' | ||
- '7.1' | ||
- '7.2' | ||
sudo: false | ||
cache: | ||
directories: | ||
- $HOME/.composer/cache/files | ||
- $HOME/symfony-bridge/.phpunit | ||
|
||
env: | ||
global: | ||
- PHPUNIT_FLAGS="-v" | ||
- SYMFONY_PHPUNIT_DIR="$HOME/symfony-bridge/.phpunit" | ||
|
||
matrix: | ||
fast_finish: true | ||
include: | ||
# Minimum supported dependencies with the latest and oldest PHP version | ||
- php: 7.3 | ||
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" SYMFONY_DEPRECATIONS_HELPER="weak_vendors" | ||
- php: 7.2 | ||
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" SYMFONY_DEPRECATIONS_HELPER="weak_vendors" | ||
- php: 7.1 | ||
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest" SYMFONY_DEPRECATIONS_HELPER="weak_vendors" | ||
|
||
# Test the latest stable release | ||
- php: 7.1 | ||
- php: 7.2 | ||
- php: 7.3 | ||
env: COVERAGE=true PHPUNIT_FLAGS="-v --coverage-text" | ||
|
||
# Test LTS versions. This makes sure we do not use Symfony packages with version greater | ||
# than 2 or 3 respectively. Read more at https://github.com/symfony/lts | ||
- php: 7.2 | ||
env: DEPENDENCIES="symfony/lts:^3" | ||
|
||
# Latest commit to master | ||
- php: 7.2 | ||
env: STABILITY="dev" | ||
|
||
allow_failures: | ||
# Dev-master is allowed to fail. | ||
- env: STABILITY="dev" | ||
|
||
before_install: | ||
- if [[ $COVERAGE != true ]]; then phpenv config-rm xdebug.ini || true; fi | ||
- if ! [ -z "$STABILITY" ]; then composer config minimum-stability ${STABILITY}; fi; | ||
- if ! [ -v "$DEPENDENCIES" ]; then composer require --no-update ${DEPENDENCIES}; fi; | ||
|
||
install: | ||
- composer install | ||
# To be removed when this issue will be resolved: https://github.com/composer/composer/issues/5355 | ||
- if [[ "$COMPOSER_FLAGS" == *"--prefer-lowest"* ]]; then composer update --prefer-dist --no-interaction --prefer-stable --quiet; fi | ||
- composer update ${COMPOSER_FLAGS} --prefer-dist --no-interaction | ||
- ./vendor/bin/simple-phpunit install | ||
|
||
script: | ||
- mkdir -p build/logs | ||
- bin/phpunit Tests --coverage-clover build/logs/coverage.xml | ||
|
||
after_script: | ||
- bin/coveralls -v --coverage_clover build/logs/coverage.xml | ||
- composer validate --strict --no-check-lock | ||
# simple-phpunit is the PHPUnit wrapper provided by the PHPUnit Bridge component and | ||
# it helps with testing legacy code and deprecations (composer require symfony/phpunit-bridge) | ||
- ./vendor/bin/simple-phpunit $PHPUNIT_FLAGS |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# Simple log Viewer Symfony Bundle | ||
|
||
LogViewerBundle is a basic log viewer for symfony. | ||
It allows you to list and view all of the symfony logs or external logs in one easy | ||
place with level highlighting and level filtering. | ||
|
||
## Installation | ||
Install the package with: | ||
```console | ||
composer require evotodi/log-viewer-bundle | ||
``` | ||
## Configuration | ||
|
||
Create the routes yaml file `config/routes/evo_log_viewer_routes.yaml` | ||
|
||
```yaml | ||
evo_log_viewer: | ||
resource: '@EvotodiLogViewerBundle/Resources/config/routes.xml' | ||
prefix: '/logs' | ||
``` | ||
Create the config yaml file `config/packages/evo_log_viewer.yaml` | ||
```yaml | ||
# List of log files to show | ||
log_files: | ||
log_name: | ||
# Use full path | ||
path: 'Some/Full/Path/to/Log/File.Ext' | ||
# Pretty name to display else file name | ||
name: My Log Files Pretty Name | ||
# (Optional) Number of days to pull from log. See ddtraceweb/monolog-parser. | ||
days: 0 | ||
# (Optional) See ddtraceweb/monolog-parser for patterns. | ||
pattern: null | ||
# (Optional) PHP style date format of log file | ||
date_format: 'Y-m-d H:i:s' | ||
# Show App logs in var/log | ||
show_app_logs: true | ||
``` | ||
## Advanced Configuration | ||
|
||
#### pattern | ||
The default pattern is `'/\[(?P<date>.*)\] (?P<logger>\w+).(?P<level>\w+): (?P<message>[^\[\{].*[\]\}])/'` | ||
\ | ||
You can change the regex pattern to match your log file but the pattern must include `P<date>`, `P<logger>`, `P<level>`, and `P<message>` as regex groups. | ||
\ | ||
Example `'/\[(?P<date>.+)\] (?P<logger>\w+).(?P<level>\w+): (?P<message>.*)/'` | ||
\ | ||
See ddtraceweb/monolog-parser for other examples but ommit `P<context>` and `P<extra>` | ||
|
||
#### days | ||
Setting days in the config to 0 will parse to whole log which is the default. Days set to 5 for example will parse the log until the date portion of the pattern | ||
if greater than DateTime('now') minus 5 days. | ||
|
||
#### date_format | ||
This should be the php date format of the date portion of the pattern. Default is Y-m-d H:i:s | ||
/ | ||
[PHP DateFormat](https://www.php.net/manual/en/function.date.php) | ||
|
||
## Thanks | ||
Thanks to ddtraceweb/monolog-parser and greenskies/web-log-viewer-bundle. | ||
|
||
## Contributions | ||
Contributions are very welcome! | ||
|
||
Please create detailed issues and PRs. | ||
|
||
## License | ||
|
||
This package is free software distributed under the terms of the [MIT license](LICENSE). |
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
/*! | ||
* Agate by Taufik Nurrohman <https://github.com/tovic> | ||
* ---------------------------------------------------- | ||
* | ||
* #ade5fc | ||
* #a2fca2 | ||
* #c6b4f0 | ||
* #d36363 | ||
* #fcc28c | ||
* #fc9b9b | ||
* #ffa | ||
* #fff | ||
* #333 | ||
* #62c8f3 | ||
* #888 | ||
* | ||
*/ | ||
|
||
.hljs { | ||
display: block; | ||
overflow-x: auto; | ||
padding: 0.5em; | ||
background: #333; | ||
color: white; | ||
} | ||
|
||
.hljs-name, | ||
.hljs-strong { | ||
font-weight: bold; | ||
} | ||
|
||
.hljs-code, | ||
.hljs-emphasis { | ||
font-style: italic; | ||
} | ||
|
||
.hljs-tag { | ||
color: #62c8f3; | ||
} | ||
|
||
.hljs-variable, | ||
.hljs-template-variable, | ||
.hljs-selector-id, | ||
.hljs-selector-class { | ||
color: #ade5fc; | ||
} | ||
|
||
.hljs-string, | ||
.hljs-bullet { | ||
color: #a2fca2; | ||
} | ||
|
||
.hljs-type, | ||
.hljs-title, | ||
.hljs-section, | ||
.hljs-attribute, | ||
.hljs-quote, | ||
.hljs-built_in, | ||
.hljs-builtin-name { | ||
color: #ffa; | ||
} | ||
|
||
.hljs-number, | ||
.hljs-symbol, | ||
.hljs-bullet { | ||
color: #d36363; | ||
} | ||
|
||
.hljs-keyword, | ||
.hljs-selector-tag, | ||
.hljs-literal { | ||
color: #fcc28c; | ||
} | ||
|
||
.hljs-comment, | ||
.hljs-deletion, | ||
.hljs-code { | ||
color: #888; | ||
} | ||
|
||
.hljs-regexp, | ||
.hljs-link { | ||
color: #c6b4f0; | ||
} | ||
|
||
.hljs-meta { | ||
color: #fc9b9b; | ||
} | ||
|
||
.hljs-deletion { | ||
background-color: #fc9b9b; | ||
color: #333; | ||
} | ||
|
||
.hljs-addition { | ||
background-color: #a2fca2; | ||
color: #333; | ||
} | ||
|
||
.hljs a { | ||
color: inherit; | ||
} | ||
|
||
.hljs a:focus, | ||
.hljs a:hover { | ||
color: inherit; | ||
text-decoration: underline; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
/* | ||
Date: 24 Fev 2015 | ||
Author: Pedro Oliveira <kanytu@gmail . com> | ||
*/ | ||
|
||
.hljs { | ||
color: #a9b7c6; | ||
background: #282b2e; | ||
display: block; | ||
overflow-x: auto; | ||
padding: 0.5em; | ||
} | ||
|
||
.hljs-number, | ||
.hljs-literal, | ||
.hljs-symbol, | ||
.hljs-bullet { | ||
color: #6897BB; | ||
} | ||
|
||
.hljs-keyword, | ||
.hljs-selector-tag, | ||
.hljs-deletion { | ||
color: #cc7832; | ||
} | ||
|
||
.hljs-variable, | ||
.hljs-template-variable, | ||
.hljs-link { | ||
color: #629755; | ||
} | ||
|
||
.hljs-comment, | ||
.hljs-quote { | ||
color: #808080; | ||
} | ||
|
||
.hljs-meta { | ||
color: #bbb529; | ||
} | ||
|
||
.hljs-string, | ||
.hljs-attribute, | ||
.hljs-addition { | ||
color: #6A8759; | ||
} | ||
|
||
.hljs-section, | ||
.hljs-title, | ||
.hljs-type { | ||
color: #ffc66d; | ||
} | ||
|
||
.hljs-name, | ||
.hljs-selector-id, | ||
.hljs-selector-class { | ||
color: #e8bf6a; | ||
} | ||
|
||
.hljs-emphasis { | ||
font-style: italic; | ||
} | ||
|
||
.hljs-strong { | ||
font-weight: bold; | ||
} |