Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
wujunze committed Apr 21, 2018
0 parents commit dc03c0a
Show file tree
Hide file tree
Showing 12 changed files with 229 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -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
11 changes: 11 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/vendor
composer.lock
.DS_Store
.idea
18 changes: 18 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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
Empty file added CHANGELOG.md
Empty file.
Empty file added LICENSE
Empty file.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<h1 align="center">SeasLogger</h1>

<p align="center"> An effective,fast,stable log package for PHP </p>
Empty file added UPGRADE.md
Empty file.
39 changes: 39 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -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"
]
}
}
22 changes: 22 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false">
<testsuites>
<testsuite name="Application Test Suite">
<directory>./tests/</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">src/</directory>
</whitelist>
</filter>
</phpunit>
102 changes: 102 additions & 0 deletions src/Logger.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
<?php

namespace SeasX\SeasLogger;


use Psr\Log\LoggerInterface;

class Logger implements LoggerInterface
{
/**
* @param string $message
* @param array $context
* @return mixed
*/
public function emergency($message, array $context = array())
{
// TODO: Implement emergency() method.
}

/**
* @param string $message
* @param array $context
* @return mixed
*/
public function alert($message, array $context = array())
{
// TODO: Implement alert() method.
}

/**
* @param string $message
* @param array $context
* @return mixed
*/
public function critical($message, array $context = array())
{
// TODO: Implement critical() method.
}

/**
* @param string $message
* @param array $context
* @return mixed
*/
public function error($message, array $context = array())
{
// TODO: Implement error() method.
}

/**
* @param string $message
* @param array $context
* @return mixed
*/
public function warning($message, array $context = array())
{
// TODO: Implement warning() method.
}

/**
* @param string $message
* @param array $context
* @return mixed
*/
public function notice($message, array $context = array())
{
// TODO: Implement notice() method.
}

/**
* @param string $message
* @param array $context
* @return mixed
*/
public function info($message, array $context = array())
{
// TODO: Implement info() method.
}

/**
* @param string $message
* @param array $context
* @return mixed
*/
public function debug($message, array $context = array())
{
// TODO: Implement debug() method.
}

/**
* @param mixed $level
* @param string $message
* @param array $context
* @return mixed
*/
public function log($level, $message, array $context = array())
{
// TODO: Implement log() method.
}


}
10 changes: 10 additions & 0 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?php

namespace SeasX\SeasLogger\Tests;

use PHPUnit\Framework\TestCase as PHPUnitTestCase;

class TestCase extends PHPUnitTestCase
{

}

0 comments on commit dc03c0a

Please sign in to comment.