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
0
votes
2 answers

Hooking into the Error processing cycle

I'm building a monitoring solution for logging PHP errors, uncaught exceptions and anything else the user wants to log to a database table. Kind of a replacement for the Monitoring solution in the commercial Zend Server. I've written a Monitor class…
markus
  • 40,136
  • 23
  • 97
  • 142
0
votes
1 answer

Using Zend_Log in custom classes

I am using Zend_Log, and other required classes, without the MVC framework. I want to add Zend's logging capabilities (and other modules in the future) to my custom classes and I am wondering what the best approach is for doing so. Right now I have…
Dietcheese
  • 11
  • 4
0
votes
2 answers

Zend_Session and Zend_Log _Db are both writing to the database twice for every page load

There are plenty of examples of similar problems littered around the web but none of their solutions seem to fix this particular variation. Any suggestions would be appreciated. Usually this problem occurs because a rogue link is causing a request…
0
votes
1 answer

How Zend_Log prevent the race condition while writing a log message?

I have looked into a little bit of the Zend_Log, which is a log module of Zend Framework, but I didn't see it using a flock function to prevent a race condition if there are multiple php script writing to the same file. As per what I know, the web…
Matthewgao
  • 281
  • 1
  • 4
  • 12
0
votes
2 answers

Why Zend_Log_Writer_Firebug can't log messages from dispatchLoopShutdown plugin?

Why logs can be sent from dispatchLoopShutdown plugin as it occurs before Zend_Controller_Response_Abstract->sendResponse() and any headers haven't been sent yet ? I init logger resource in my bootstrap protected function _initLogger() { …
HongKilDong
  • 1,276
  • 3
  • 16
  • 23
0
votes
1 answer

How to output Zend log information to chrome debugger console?

With Zend Framework 1.12 you can use Zend_Log_Writer_Firebug to write log information to the firebug console. Is there a way to pass the output to the chrome debugger console? $logger = new Zend_Log(); $writer = 'production' ==…
HH.
  • 197
  • 3
  • 17
0
votes
2 answers

Issue with zend 2 log

I am currently working with zend 2 logger. I have a table error_log with the following fields: error_log_id message timestamp priorityName priority ip user_id And the following is my code $db =…
Science
  • 137
  • 2
  • 16
0
votes
1 answer

error logging in zend

i am using zend for 1st time..i am facing problems in finding errors. when a setter and getter function name mismatch i get a an error...but the error is show sometimes and not all the time...how do i log such errors.is there any separate log for…
Hacker
  • 7,798
  • 19
  • 84
  • 154
0
votes
1 answer

ZF2 custom logfile, set username

How can I make custom log (using Zend2) and set username to every log event. Here is my example how I`m trying: public function log( ) { $log_file = 'path/to/logfile.log'; $format = '%timestamp% %priorityName% (%username%) %message%'; …
sfx_lv
  • 1
0
votes
1 answer

Zend Framework 2 Zend/Log Logger

I try to create log file with Zend Framework 2. I found the solution by using Zend\Log\Logger and Zend\Log\Writer\Stream. In fact, it works fine. But the problem is that I need to use that code in every action method and in every controller…
O Connor
  • 4,236
  • 15
  • 50
  • 91
0
votes
1 answer

How to make a global Zend_Log with Zend_Application_Bootstrap

I would like to make a global Zend_Log object that I can reach from my Controllers and my Models. What should I add to my Bootstrap? (My bootstrap extends Zend_Application_Bootstrap) How then can I reach the logger object from my controller actions…
Peter Smit
  • 27,696
  • 33
  • 111
  • 170
0
votes
2 answers

Log each request in ZF2

We are using zend framework 2 for a new application, i would like to have the same logging system of Rails or similar, i would like have a log for each request, is possible to do this in Zend?
Mauro
  • 131
  • 2
  • 13
0
votes
1 answer

Zend_Log: How to change the log file permissions

I'm executing my script from web interface as well as a cron job. I'm using Zend_Log for logging and the log file is daily rotating (mylog_YYYY-MM-DD.log). If I execute my script from web in the day start, then my cron job is failing due to log file…
Venkat Papana
  • 4,757
  • 13
  • 52
  • 74
0
votes
1 answer

Zend_Log in background - possible?

My Zend_Log writers are sending data to third-party resources, like Amazon DynamoDB, for example. Such operations take time and I want to do them in background. I tried to use pcntl_fork(), but it doesn't work correctly with Apache. Do you have any…
yegor256
  • 102,010
  • 123
  • 446
  • 597
0
votes
1 answer

Zend_Log replace existing writer by a new one

here is my problem: I would like to use and existing Zend_Log instance (instance which already exists in my application) but I would like to write my logs to a different file (same path to log file like in the existing writer but with different…
Robert
  • 316
  • 1
  • 12
1 2
3