Skip to content

Commit 92f5f39

Browse files
author
Trent Schmidt
committed
Initial commit
0 parents  commit 92f5f39

18 files changed

+4086
-0
lines changed

.editorconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
; This file is for unifying the coding style for different editors and IDEs.
2+
; More information at http://editorconfig.org
3+
4+
root = true
5+
6+
[*]
7+
charset = utf-8
8+
indent_size = 4
9+
indent_style = space
10+
end_of_line = lf
11+
insert_final_newline = true
12+
trim_trailing_whitespace = true
13+
14+
[*.md]
15+
trim_trailing_whitespace = false

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
vendor
2+
/node_modules
3+
/public/storage
4+
Homestead.yaml
5+
Homestead.json
6+
.env
7+
.idea

.styleci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
preset: psr2

.travis.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
language: php
2+
sudo: required
3+
4+
cache:
5+
directories:
6+
- $HOME/.composer/cache
7+
8+
php:
9+
- 7.1
10+
11+
env:
12+
global:
13+
- TEST_COMMAND="composer test"
14+
15+
before_install:
16+
- travis_retry composer self-update
17+
18+
install:
19+
- travis_retry composer install -o ${COMPOSER_FLAGS} --prefer-source --no-interaction
20+
21+
script:
22+
- $TEST_COMMAND

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Changelog
2+
3+
All Notable changes to `uptime-robot-api` will be documented in this file.
4+
5+
Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
6+
7+
## NEXT - YYYY-MM-DD
8+
9+
### Added
10+
- Nothing
11+
12+
### Deprecated
13+
- Nothing
14+
15+
### Fixed
16+
- Nothing
17+
18+
### Removed
19+
- Nothing
20+
21+
### Security
22+
- Nothing

CONDUCT.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Contributor Code of Conduct
2+
3+
As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
4+
5+
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, or nationality.
6+
7+
Examples of unacceptable behavior by participants include:
8+
9+
* The use of sexualized language or imagery
10+
* Personal attacks
11+
* Trolling or insulting/derogatory comments
12+
* Public or private harassment
13+
* Publishing other's private information, such as physical or electronic addresses, without explicit permission
14+
* Other unethical or unprofessional conduct.
15+
16+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. By adopting this Code of Conduct, project maintainers commit themselves to fairly and consistently applying these principles to every aspect of managing this project. Project maintainers who do not follow or enforce the Code of Conduct may be permanently removed from the project team.
17+
18+
This code of conduct applies both within project spaces and in public spaces when an individual is representing the project or its community in a direct capacity. Personal views, beliefs and values of individuals do not necessarily reflect those of the organisation or affiliated individuals and organisations.
19+
20+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
21+
22+
This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0, available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/)

CONTRIBUTING.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Contributing
2+
3+
Contributions are **welcome** and will be fully **credited**.
4+
5+
We accept contributions via Pull Requests on [Github](https://github.com/montross50/laravel-monolog-mysql).
6+
7+
8+
## Pull Requests
9+
10+
- **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - The easiest way to apply the conventions is to install [PHP Code Sniffer](http://pear.php.net/package/PHP_CodeSniffer).
11+
12+
- **Add tests!** - Your patch won't be accepted if it doesn't have tests.
13+
14+
- **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date.
15+
16+
- **Consider our release cycle** - We try to follow [SemVer v2.0.0](http://semver.org/). Randomly breaking public APIs is not an option.
17+
18+
- **Create feature branches** - Don't ask us to pull from your master branch.
19+
20+
- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests.
21+
22+
- **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please [squash them](http://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages) before submitting.
23+
24+
25+
## Running Tests
26+
27+
``` bash
28+
$ composer test
29+
```
30+
31+
32+
**Happy coding**!

LICENSE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# The MIT License (MIT)
2+
3+
Copyright (c) 2018 Trent Schmidt <[email protected]>
4+
5+
> Permission is hereby granted, free of charge, to any person obtaining a copy
6+
> of this software and associated documentation files (the "Software"), to deal
7+
> in the Software without restriction, including without limitation the rights
8+
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
> copies of the Software, and to permit persons to whom the Software is
10+
> furnished to do so, subject to the following conditions:
11+
>
12+
> The above copyright notice and this permission notice shall be included in
13+
> all copies or substantial portions of the Software.
14+
>
15+
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
> THE SOFTWARE.

README.md

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
## Laravel Monolog MySQL Handler.
2+
3+
[![Latest Version on Packagist][ico-version]](https://packagist.org/packages/montross50/laravel-monolog-mysql)
4+
[![Software License][ico-license]](LICENSE.md)
5+
[![Build Status](https://img.shields.io/travis/montross50/laravel-monolog-mysql.svg?branch=master&style=flat-square)](https://travis-ci.org/montross50/laravel-monolog-mysql)
6+
[![Total Downloads](https://img.shields.io/packagist/dt/montross50/laravel-monolog-mysql.svg?style=flat-square)](https://packagist.org/packages/montross50/laravel-monolog-mysql)
7+
8+
This package will log errors into MySQL database instead storage/log/laravel.log file.
9+
10+
### Installation
11+
12+
~~~
13+
composer require montross50/monolog-mysql
14+
~~~
15+
16+
Open up `composer.json` and add the following or add the this to the existing providers.
17+
18+
~~~
19+
"extra": {
20+
"laravel": {
21+
"providers": [
22+
"Logger\\Laravel\\Provider\\MonologMysqlHandlerServiceProvider"
23+
]
24+
}
25+
}
26+
~~~
27+
28+
29+
Migrate tables.
30+
31+
~~~
32+
php artisan migrate
33+
~~~
34+
35+
## Application Integration
36+
37+
In your application `bootstrap/app.php` add:
38+
39+
~~~php
40+
41+
~~~
42+
43+
## Environment configuration
44+
45+
If you wish to change default table name to write the log into or database connection use following definitions in your .env file
46+
47+
~~~
48+
DB_LOG_TABLE=laravel_logs
49+
DB_LOG_CONNECTION=mysql
50+
~~~
51+
52+
## Change log
53+
54+
Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.
55+
56+
## Contributing
57+
58+
Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.
59+
60+
## Security
61+
62+
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
63+
64+
## Credits
65+
66+
- Trent Schmidt
67+
Based on:
68+
- [Mark Hilton] (https://github.com/markhilton/monolog-mysql)
69+
- [Pedro Fornaza] (https://github.com/pedrofornaza/monolog-mysql)
70+
71+
## License
72+
73+
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
74+
75+
[ico-version]: https://img.shields.io/packagist/v/montross50/laravel-monolog-mysql.svg?style=flat-square
76+
[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square
77+
[ico-travis]: https://img.shields.io/travis/montross50/laravel-monolog-mysql/master.svg?style=flat-square
78+
[ico-scrutinizer]: https://img.shields.io/scrutinizer/coverage/g/montross50/laravel-monolog-mysql.svg?style=flat-square
79+
[ico-code-quality]: https://img.shields.io/scrutinizer/g/montross50/laravel-monolog-mysql.svg?style=flat-square
80+
[ico-downloads]: https://img.shields.io/packagist/dt/montross50/laravel-monolog-mysql.svg?style=flat-square
81+
82+
[link-packagist]: https://packagist.org/packages/montross50/laravel-monolog-mysql
83+
[link-travis]: https://travis-ci.org/montross50/laravel-monolog-mysql
84+
[link-scrutinizer]: https://scrutinizer-ci.com/g/montross50/laravel-monolog-mysql/code-structure
85+
[link-code-quality]: https://scrutinizer-ci.com/g/montross50/laravel-monolog-mysql
86+
[link-downloads]: https://packagist.org/packages/montross50/laravel-monolog-mysql
87+
[link-author]: https://github.com/montross50
88+
[link-contributors]: ../../contributors
89+
90+
91+
92+

composer.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"name": "montross50/laravel-monolog-mysql",
3+
"type": "library",
4+
"description": "Laravel 5.6 MySQL driver for Monolog",
5+
"keywords": ["laravel", "laravel5", "log", "monolog", "mysql", "laravel56"],
6+
"homepage": "https://github.com/markhilton/monolog-mysql",
7+
"license": "MIT",
8+
"authors": [{
9+
"name": "Trent Schmidt",
10+
"email": "[email protected]",
11+
"role": "Developer"
12+
}],
13+
"require": {
14+
"php": ">=7.1.3"
15+
},
16+
"require-dev": {
17+
"phpunit/phpunit": "~7.0",
18+
"squizlabs/php_codesniffer": "~2.3",
19+
"orchestra/testbench": "~3.6"
20+
},
21+
"autoload": {
22+
"psr-4": {
23+
"Montross50\\DatabaseLogger\\": "src/Logger"
24+
}
25+
},
26+
"autoload-dev": {
27+
"psr-4": {
28+
"Montross50\\DatabaseLogger\\": "tests"
29+
}
30+
},
31+
"scripts": {
32+
"test": "vendor/bin/phpunit",
33+
"format": "phpcbf --standard=psr2 src/"
34+
},
35+
"minimum-stability": "stable"
36+
}

0 commit comments

Comments
 (0)