Giter Site home page Giter Site logo

yaf-quiet's Introduction

yaf-quiet

快速使用yaf开发项目

使用方法:

1、服务器必须先安装了yaf扩展,并且开启了命名空间 (yaf手册:http://www.laruence.com/manual/index.html)

2、将yaf-quiet上传至服务器,配置下conf目录下的application.ini配置文件 改动下数据库的账号密码就好了。如果配置都对,浏览器访问站点即可看到 hello world!

3、项目开发可参考Index.php以及Test module,里面有实例

集成的类库:

1、文件缓存和redis缓存

2、PDO

3、图片上传以及裁剪

4、日志类,使用了monolog

5、分页

6、smarty模板引擎

7、composer

yaf-quiet's People

Contributors

solely avatar

Stargazers

 avatar Yume avatar  avatar

Watchers

James Cloos avatar  avatar

yaf-quiet's Issues

为什么log打印的日志是重复的两条

public function indexAction() { echo 'hello world!'; Log::error('测试warning2', array('error' => 'error', 'second' => 'secondError')); dump($_GET); dump($this->getRequest()->getParams()); return false; }
日志里的结果却是完全相同的两条
[2017-08-29 11:13:11] app.ERROR: 测试warning2 {"error":"error","second":"secondError"} []
[2017-08-29 11:13:11] app.ERROR: 测试warning2 {"error":"error","second":"secondError"} []

抛开封装的Log类,直接调用monolog

`
public function indexAction()
{
echo 'hello world!';
//Log::error('测试warning2', array('error' => 'error', 'second' => 'secondError'));
$log = new Logger('test');
$log->pushHandler(new StreamHandler(APPLICATION_PATH.'/log/test.log', Logger::ERROR));
$log->error('Bar');

    dump($_GET);
    dump($this->getRequest()->getParams());
    return false;
}

`

日志里同样是两条完全一样的日志

[2017-08-29 11:22:54] test.ERROR: Bar [] []
[2017-08-29 11:22:54] test.ERROR: Bar [] []

通过页面打印的结果来看,indexAction 确实是只执行了一次,请问这个是monolog的问题吗,还是需要其他配置 LINUX环境

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.