<small id='QVNeo'></small><noframes id='QVNeo'>

      <legend id='QVNeo'><style id='QVNeo'><dir id='QVNeo'><q id='QVNeo'></q></dir></style></legend>

      1. <tfoot id='QVNeo'></tfoot>
        <i id='QVNeo'><tr id='QVNeo'><dt id='QVNeo'><q id='QVNeo'><span id='QVNeo'><b id='QVNeo'><form id='QVNeo'><ins id='QVNeo'></ins><ul id='QVNeo'></ul><sub id='QVNeo'></sub></form><legend id='QVNeo'></legend><bdo id='QVNeo'><pre id='QVNeo'><center id='QVNeo'></center></pre></bdo></b><th id='QVNeo'></th></span></q></dt></tr></i><div id='QVNeo'><tfoot id='QVNeo'></tfoot><dl id='QVNeo'><fieldset id='QVNeo'></fieldset></dl></div>
        • <bdo id='QVNeo'></bdo><ul id='QVNeo'></ul>
      2. Zend_Log in application.ini

        Zend_Log in application.ini(Zend_Log in application.ini)
            <tbody id='ILfr5'></tbody>
          • <bdo id='ILfr5'></bdo><ul id='ILfr5'></ul>

            <small id='ILfr5'></small><noframes id='ILfr5'>

              <i id='ILfr5'><tr id='ILfr5'><dt id='ILfr5'><q id='ILfr5'><span id='ILfr5'><b id='ILfr5'><form id='ILfr5'><ins id='ILfr5'></ins><ul id='ILfr5'></ul><sub id='ILfr5'></sub></form><legend id='ILfr5'></legend><bdo id='ILfr5'><pre id='ILfr5'><center id='ILfr5'></center></pre></bdo></b><th id='ILfr5'></th></span></q></dt></tr></i><div id='ILfr5'><tfoot id='ILfr5'></tfoot><dl id='ILfr5'><fieldset id='ILfr5'></fieldset></dl></div>

                <tfoot id='ILfr5'></tfoot>
                • <legend id='ILfr5'><style id='ILfr5'><dir id='ILfr5'><q id='ILfr5'></q></dir></style></legend>
                  本文介绍了Zend_Log in application.ini的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  是否有任何示例如何从 application.ini 设置 Zend 日志的实例?我只找到了一个记录到文件的示例,但我想登录到 SQLITE 数据库表?

                  is there any example how to setup an instance of zend log from application.ini? I have only found an example for logging to an file, but i want to log into an SQLITE database table?

                  Zend 日志资源

                  推荐答案

                  好问题.我找不到从引导程序配置实例化 Zend_Log_Writer_Db 的方法.writer 类需要一个 Zend_Db_Adapter 对象.它不接受字符串.

                  Good question. I can't find a way to instantiate the Zend_Log_Writer_Db from a bootstrap config. The writer class requires a Zend_Db_Adapter object. It doesn't accept a string.

                  采埃孚项目需要进一步开发这个用例.他们甚至没有任何包含数据库编写器的 Zend_Application_Resource_Log 单元测试.

                  The ZF project needs to develop this use case further. They don't even have any unit tests for Zend_Application_Resource_Log that include a Db writer.

                  在那之前我最好的建议是,您的 Bootstrap 类需要在 _initLog() 方法中自定义 Log 资源.

                  The best I can suggest until then is that you Bootstrap class needs to customize the Log resource in an _initLog() method.

                  class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
                  {
                  
                    protected function _initDb()
                    {
                      if ($this->hasPluginResource("db")) {
                        $r = $this->getPluginResource("db");
                        $db = $r->getDbAdapter();
                        Zend_Registry::set("db", $db);
                      }
                    }
                  
                    protected function _initLog()
                    {
                      if ($this->hasPluginResource("log")) {
                        $r = $this->getPluginResource("log");
                        $log = $r->getLog();
                  
                        $db = Zend_Registry::get("db");
                        $writer = new Zend_Log_Writer($db, "log", ...columnMap...);
                        $log->addWriter($writer);
                  
                        Zend_Registry::set("log", $log);
                      }
                    }
                  
                  }
                  

                  这篇关于Zend_Log in application.ini的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                  PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                  mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                  Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                  Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                  Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)

                      <tbody id='3K5bg'></tbody>
                          <bdo id='3K5bg'></bdo><ul id='3K5bg'></ul>
                        • <legend id='3K5bg'><style id='3K5bg'><dir id='3K5bg'><q id='3K5bg'></q></dir></style></legend>

                          <tfoot id='3K5bg'></tfoot>
                          <i id='3K5bg'><tr id='3K5bg'><dt id='3K5bg'><q id='3K5bg'><span id='3K5bg'><b id='3K5bg'><form id='3K5bg'><ins id='3K5bg'></ins><ul id='3K5bg'></ul><sub id='3K5bg'></sub></form><legend id='3K5bg'></legend><bdo id='3K5bg'><pre id='3K5bg'><center id='3K5bg'></center></pre></bdo></b><th id='3K5bg'></th></span></q></dt></tr></i><div id='3K5bg'><tfoot id='3K5bg'></tfoot><dl id='3K5bg'><fieldset id='3K5bg'></fieldset></dl></div>

                          <small id='3K5bg'></small><noframes id='3K5bg'>