Questions tagged [zend-log]

For issues relating to the Zend/Log logging component of the Zend framework.

Zend\Log is a component of the Zend framework for general purpose logging. It supports multiple log backends, formatting messages sent to the log, and filtering messages from being logged.

Resources:

45 questions
14
votes
2 answers

Is there a way to disable xdebug's var_dump temporarily?

I want to use Zend_Debug::dump, to keep some variables in the log, but since I have xdebug installed, and xdebug replaces php's var_dump, my values in log are html values produced by xdebug. I was wondering if there is a way in php to disable this…
Yasser1984
  • 2,401
  • 4
  • 32
  • 55
13
votes
4 answers

How to register Zend_Log in the bootstrap of a ZF 1.8+ application?

So I want to start logging in my Zend Framework application. I want to register the logger somewhere in my bootstrap so that I can easily access it from any controller action. I think this should be a simple thing that has been done before, but how…
Andrew
  • 227,796
  • 193
  • 515
  • 708
7
votes
5 answers

How to register a Zend\Log Instance in the ServiceManager in ZF2

I am wondering what is the best way to initiate and re-use a logger instance through the ServiceManager in ZF2. Of course I can do a simple method to be used in any class, like: public function getLogger () { $this->logger = new Logger(); …
Al-Punk
  • 3,531
  • 6
  • 38
  • 56
6
votes
2 answers

Zend Framework 2 - Applications / Modules / Service Managers - Oh My

I have just started learning Zend Framework 2 as a long time Zend Framework 1 developer. I am having a little trouble wrapping my head around the new terminology. Back in ZF1, if I wanted to create a logger that was global to an application I would…
Aaron Murray
  • 1,920
  • 3
  • 22
  • 38
5
votes
1 answer

Is UML Class Diagram of Zend_Log correct?

Background of question Analysis of Zend_Log reveals following Class Diagram Zend_Log: uses ReflectionClass & Zend_Log_Exception maintains reference to array of Zend_Log_Writer_Abstract maintains references to array of…
Ahmed Memon
  • 219
  • 3
  • 11
5
votes
1 answer

ZF2 Zend\Log + Doctrine2

I do not know how to configure Zend \ Log with Doctrine2. Only allows you to write directly to the database via a connection adapter or write to a file.
supernacho
  • 85
  • 5
4
votes
2 answers

how to change date format in "zend_log"

How can I change date format of the Zend_Log? Now there is date with timestamp added in front of every new log entry: "2013-01-28T16:47:54+01:00 ... some log message ..." But I would like to format this date like: "Y-m-d H:i:s ... some log message…
Bartek Kosa
  • 842
  • 1
  • 14
  • 25
3
votes
1 answer

Zend Framework default log level

Is it possible to set default log level for entire applicaton? I would like to set it from application.ini. I would like to set loggers to log to database and firephp.
Hubidubi
  • 850
  • 4
  • 18
  • 34
2
votes
2 answers

How to use Zend Log as a separated component?

I want to use Zend Framwork's Log mechanism as a separated component,that means all I want from ZF is just the Log, How can I do this?
castiel
  • 2,675
  • 5
  • 29
  • 38
2
votes
2 answers

Zend_Log with multiple writers in application.ini

i have a logger in my config like this: resources.log.stream.writerName = "Stream" resources.log.stream.writerParams.stream = APPLICATION_PATH "/../logs/err.log" resources.log.stream.writerParams.mode = "a" resources.log.stream.filterName =…
duzenz
  • 331
  • 1
  • 4
  • 9
2
votes
1 answer

Storing an instance of Zend_Log in Zend_Cache/Zend_Registry with/without custom helper

I am trying to store an instance of Zend_Log (with Zend_Log_Writer_Stream) to Zend_Cache(preferably) or Zend_Registry(fallback) but with the custom helper as an abstraction layer instead of direct access. Problem Except when using Zend_Registry…
Shoaibi
  • 859
  • 2
  • 11
  • 23
2
votes
1 answer

Storing data in Zend_Registry vs Zend_Cache

So far i have been using Bootstrap.php to load my application.ini config into Zend_Registry as well as an instance of logger. I was wondering if storing these inside Zend_Cache would be a better solution as these remain unchanged over lifespan of…
Shoaibi
  • 859
  • 2
  • 11
  • 23
2
votes
2 answers

Relative path for Zend_Log in Zend Framework

I am trying to work out the best way to configure my Zend_Log_Writer_Stream instance to write to a filename relative to my APPLICATION_PATH. For example, with the following config: resources.log.stream.writerName =…
Matt Wheeler
  • 455
  • 2
  • 10
2
votes
1 answer

FirePHP doesn't always write log messages

I set my loggers up in my Bootstrap.php like so: $logger = new Zend_Log(); if($environment->debug == '1') { $stream = @fopen('/var/www/html/rta/rta.log','a',false); if(!$stream){ throw new Exception('Failed to open log…
ashurexm
  • 6,209
  • 3
  • 45
  • 69
2
votes
1 answer

Logging custom elements Zend Log Formatter XML

I'm trying to some information about a request and the result should be put in an XML file. I'm using the following elements: logEntry(root) (default) timestamp (default) (string) timestamp priority (default) (string) priority priorityName…
ivodvb
  • 1,164
  • 2
  • 12
  • 39
1
2 3