diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..df55cd7 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,20 @@ +root = true + +[*] +indent_style = space +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = false + +[*.{vue,js,scss}] +charset = utf-8 +indent_style = space +indent_size = 2 +end_of_line = lf +insert_final_newline = true +trim_trailing_whitespace = true + +[*.md] +trim_trailing_whitespace = false \ No newline at end of file diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..6094f54 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,11 @@ +* text=auto + +/tests export-ignore +.gitattributes export-ignore +.gitignore export-ignore +.scrutinizer.yml export-ignore +.travis.yml export-ignore +phpunit.php export-ignore +phpunit.xml.dist export-ignore +phpunit.xml export-ignore +.php_cs export-ignore \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f0be067 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +/vendor +composer.lock +.DS_Store +.idea \ No newline at end of file diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..6d17000 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,18 @@ +language: php + +php: + - 7.0 + - 7.1 + - 7.2 + +before_script: + - composer self-update + - composer install --prefer-source --no-interaction --dev + +after_script: + + +script: ./vendor/bin/phpunit --verbose + +matrix: + fast_finish: true \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..e69de29 diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..e69de29 diff --git a/README.md b/README.md new file mode 100644 index 0000000..cccc390 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +

SeasLogger

+ +

An effective,fast,stable log package for PHP

\ No newline at end of file diff --git a/UPGRADE.md b/UPGRADE.md new file mode 100644 index 0000000..e69de29 diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..c27c048 --- /dev/null +++ b/composer.json @@ -0,0 +1,39 @@ +{ + "name": "seasx/seaslogger", + "description": "An effective,fast,stable log package for PHP", + "keywords": [ + "log", + "logging", + "psr-3" + ], + "type": "library", + "license": "PHP", + "authors": [ + { + "name": "SeasX", + "homepage": "https://github.com/SeasX" + } + ], + "require": { + "php": "^7.0", + "psr/log": "^1.0.2" + }, + "require-dev": { + "phpunit/phpunit": "^6.5" + }, + "autoload": { + "psr-4": { + "SeasX\\Seaslogger\\": "src" + } + }, + "autoload-dev": { + "psr-4": { + "SeasX\\Seaslogger\\Tests\\": "tests" + } + }, + "scripts": { + "test": [ + "phpunit" + ] + } +} diff --git a/phpunit.xml.dist b/phpunit.xml.dist new file mode 100644 index 0000000..f284469 --- /dev/null +++ b/phpunit.xml.dist @@ -0,0 +1,22 @@ + + + + + ./tests/ + + + + + src/ + + + \ No newline at end of file diff --git a/src/Logger.php b/src/Logger.php new file mode 100644 index 0000000..e7cbbcf --- /dev/null +++ b/src/Logger.php @@ -0,0 +1,102 @@ +