Art AboutFAQWrite for usContact InfoRSS Feed
Search A/R/T:

Application-level Logging with the Zend Framework

by Stefan Koopmanschap — Page 1 of 2
Click to rate:    
145 votes / avg. rating 16.00%

There are different reasons for logging information, different strategies for what and how to log, and of course different ways of implementing it. This article will look at why you would want to log, what you want to log and how to do it.


 

With every installation of PHP, there are several logs available. Your webserver will keep its own access log and error log, from which you can get quite some information that can be used for statistics on your users and possibly also debugging your website. Then php also has an error log, which is also very useful for debugging your code. All these logs are completely independent of your application: They'll be there whether your application is or isn't. They give very global information on your application, mainly when something goes wrong. If you want more detailed information on what your application is doing, then you won't find that information in these logs. Your application is a black box. Something comes in, something happens, and then there is output. What can you do?

Introducing the application level log

The webserver and PHP logs are what I'd like to call server level logs. They are written by the server layer on every request, or at least when necessary, and give information on a server level. To get more information on your application and the behaviour of your application, you'll need to implement a system yourself for logging information. Because this happens inside your application, this is the application level log. The application log will contain all the information that you choose to save about what happens inside your application.

Unlike the server logs, the application logging will need to be implemented by you. This will mean more work for you, but also more power. Because now you will be able to determine what gets logged, and in which situation that information is being logged.

Why logging?

There are different reasons why you'd want to log information from your application:

  • Debugging during development (bug prevention)
  • Debugging on your production server (bug fixing)
  • Statistics
  • Security
Obviously, your situation might even have other reasons for logging information. I'm just listing the most common ones.

Debugging during development

I'm sure a lot of people reading this have been in the situation where they are working on something complicated, and you don't get the output you expect. Whatever you do, you can not get the expected output to pop up. You keep thinking to yourself “Wouldn't it be great if I could find out what was going on inside to see where it goes wrong?” Of course you can! Aside from the various debuggers, like the Zend Studio debugger or DBG, logging your information into a file or database will also help you in this. In the various stages of your application, you can log certain values that are essential or might be wrong at some point, you run the script, and then view the logs to find out where it goes wrong. This is also safer than adding echo or print statements while developing. Imagine what happens if you accidentally forget to remove one of these statements after debugging has finished...

Debugging on your production server

Another situation you might recognize is where you get the report from a user that some part of your system is malfunctioning. However, when you do what they do, nothing seems wrong. The user has found a situation that you have not tested or could not test. When you are logging the essential information, the only question you need to ask your user is: “When exactly were you trying this?” Armed with the time (possibly converted from the user's local time to your server time) you start going through your logs. The logs can be a treasure in this process, wielding tons of information that would usually be very hard to find.

Statistics

This reason is more for corporate environments I guess, but statistics can be good for all kinds of things. Logging certain information that you need for statistics is the best way of gathering the information. Most basic information (like user agent, browser plugins, referrers etc) can be gathered from the server logs. But if, for whatever reason, you need more information than the basic information, just log it into a file or database, and you can write all the statistical scripts you want gathering the data from your logs.

Security

Of course, everyone wants to write scripts that are secure, that can not be cracked. Unfortunately, nobody is perfect and (almost) everybody will make a mistake here or there. The best thing is always prevention, but in the case that you are victim of a cracker, information you are logging may give you important clues on the methods the cracker used to get into your system. Aside from finding the vulnerability, logging might also give you an idea of what exactly the cracker did in your system, what damage might've been done, what information the cracker might have obtained, and if this cracker left any traces or backdoors for possible future attempts.

 


 Tags:  , , ,
 Add tag(s) (comma separated):
[Tags beta] — [Add New][Help]  

Tags Help

Tags are keywords associated with a web page that help classifying information. You can find a good explanation here.

To add one or more tags to this page, simply enter them below (separate them with a comma) and hit enter or click on the "Go" button.

New Comment
This form allows you to type in a new comment. Keep in mind the following:
  • The system accepts input in plain text format. Newlines will be converted to the HTML equivalent, and the system will try to catch most URLs and make them clickable.
  • Your e-mail address will never be displayed. We will use it only to notify you when new comments are posted to this page.
  • As a rule, we do not delete comments unless they are offensive, racist, spam or otherwise inappropriate.
  • Bold fields are required
Your Name:
Your e-mail:
Type this number:
Subject:
Comment:
Comments   New Comment
What an excellent tutorial youve written! (#364)
By Jonathan Kushner on 2006-11-16 01:05:45

Stefan,

I just read through your article on logging with Zend. While I don't plan on using the zend framework, I do have a current task of designing us a simple, yet nicely tailored and effective logger.

Here is what I really liked about your tutorial versus the others Ive read:

1) Your simple, straightforward way of saying things. Sometimes, I dont really care about how much you can discuss on a subject. I see what it does and make my decision then.

Lastly, AND DEFININTELY MOST IMPORTANTLY, is your way of telling a great story concerning the user interaction and the connection with the logger.

I usually do not comment people with the aount of articles and ebooks I read, AND especially have never written a comment as long as this, but you've definitely given me a clear site into my goals.

Thanks much dude

[Reply to this]

Re: Application-level Logging with the Zend Framework (#376)
By Ravi on 2006-12-11 04:19:11

Hi,
I read the article.
your article is so good...
But some point are missing in your article
for ex. Advanced Logging: Multiple Loggers
How to create the multiple logger.
How we can read the created log files...
etc...


Thanks & Regards
Ravi

[Reply to this]

Logging Gotchas (#477)
By Xavier on 2007-01-26 09:46:02

Hi all,
Just a few gotchas that you might face...
1) Setting up Console logging is easier than File logging
- you dont have to worry about read-write file permissions
2)File Logging
Zend_Log::registerLogger(new Zend_Log_Adapter_File('/logs/get.log'));
- when I used this statement, the app kept 'hanging' when I tried to log something.
- I made sure I set all file permission to 777 but still had the problem
- it worked when I used ... ('./logs/get.log') ...
- the issue is the logs are relative to your base calling function.
- if your log directory is outside your /htdocs directory (for security), be sure to use something like ..('./../logs/get.log')..

Cheers.
http://harro.com

[Reply to this]

Re: Application-level Logging with the Zend Framework (#535)
By Raju on 2007-05-15 09:30:30

I went through this article. I have used log4php before. It was good to see zend framework examples. However what would be even better is if there was some indication of trade off in performance. How much does a certain logging cost in performance. Then may be one could come up with the most optimised way of logging data.
Regards
Raju
http://www.cartridge.bg

[Reply to this]

QUICK MONEY JUST $6 INVESTMENT BY OPERA AND 20/20 REALLY WORKS!!!! (#600)
By QUICK CASH!!!!! on 2007-10-12 22:38:06

Paypal Trick really works
PAYPAL VERIFIES THAT THIS $6 INVESTMENT SCHEME IS 100% LEGAL AND IS A
BIG HIT THIS YEAR SEE THEIR NOTE BELOW OR ASK THEM DIRECTLY...

THIS SCHEME MIGHT TAKE 15-30 MINUTES AND JUST $6, BUT IT IS 100% WORTH
IT TO MAKE THOUSANDS SO QUICKLY.

THIS IS NOT ANOTHER SCAM THAT TAKES LOTS OF YOUR HARD EARNED MONEY;
THIS IS A NO RISK INVESTMENT THAT WILL MAKE YOU THOUSANDS OF DOLLARS
VERY EASILY AND QUICKLY.

>From PayPal:
"Dear Member, it has come to our attention that there is a PayPal scheme
floating around at the moment you may have heard or seen the $6 scheme.
You may have even taken part in it well we have been asked a lot of
questions about this scheme the answer is yes it does work and yes it
is safe to use providing you follow the rules it is legal and has made
a big hit on the internet this year. If you would like to take part in
this scheme or would like a bit more information then please see the
attached file that was kindly donated to us. Thank you for using PayPal!

"TURN $6 INTO $15,000 IN ONLY 30 DAYS...HERES HOW!
You have most likely seen or heard about this project on TV programs
such as 20/20 and Oprah, or you may have read about it in the Wall
Street Journal. If not, here it is below - revealed to you in
step-by-step detail. This program is by no means new. It has been in
existence in many forms for at least a decade. But in the early days, it
required a lot more time and effort, as well as an investment of a few
hundred dollars.

However, thanks to PayPal and the Internet, the investment is now
virtually ZERO! And what's more, the entire process is FASTER, EASIER,
and MORE LUCRATIVE than it has EVER been!

Below is the email sent to me: How to Turn $6 into $15,000 in 30 Days
with PayPal I WAS SHOCKED WHEN I SAW HOW MUCH MONEY CAME FLOODING INTO MY PAYPAL ACCOUNT

I turned $6 into $14,706 within the first 30 days of operating the
business plan that I am about to reveal to you free of charge. If you
decide to take action on the following instructions, I will GUARANTEE
that you will enjoy a similar return! STILL NEED PROOF? Here are just 3
testimonials from the countless individuals who decided to invest
nothing more than $6 and half an hour of their time to participate in
this program:

"What an amazing plan! I followed your instructions just 3 weeks ago,
and although I haven't made 15 grand yet, I'm already up to $9,135. I'm
absolutely gob smacked." -Pam Whittemore , Ohio

"Well, what can I say?... THANK YOU SO MUCH! I sent 40e-mail's out like
you said and then I just forgot about the whole thing. To be honest, I
didn't really think anything would come of it. But when I checked my
paypal account a week later, there was over $5,000 in it! After 30 days
I now have over $11,000 to spend! I can't thank you enough!"-Juan
Tovar, NY,NY

"I was shocked when I saw how much money came flooding into my paypal
account. Within 3 weeks my account balance has ballooned to $12,449. At
first I thought there had been some sort of error with my account!"
-Richard Barrie , Boulder, CO

The only things you will need are: An email address. A Business PayPal
account with at least $6 deposited init, and just 15 to 30 minutes of
your time.

This program takes just half an hour to set up. After that, there is
absolutely no work whatsoever to do on your part. You have absolutely
NOTHING to lose, and there is NO LIMIT to the amount of income you can
generate from this one single business program. Let's get started, just
follow the instructions exactly as set out below and then prepare
yourself for a HUGE influx of cash over the next 30 days!

Here's what you need to do. . .REQUIREMENTS
#1) an email address
#2) a Premier or Business PayPal account

STEP #1 - Setting up your FREE PayPal Account It's extremely safe and
very easy to set up a FREE PayPal account! Copy and paste this to the
address bar "https:// www.paypal.com" (notice the secure "https" within
the link)

Be sure to sign up for a free PREMIER or BUSINESS account (and not just
a PERSONAL account) otherwise you won't be able to receive credit card
payments from other people.

STEP #2 - Sending PayPal money "It is an undeniable aw of the universe
that we must first give in order to receive."Now all you have to do is
send $1.00 by way of PayPal to each of the six email addresses listed
below. Make sure the subject of the payment says... *PLEASE PUT ME ON
YOUR EMAIL LIST* (this keeps the program100% legal.. so please don't
forget!). IF YOU FAIL TO DO THIS YOU ARE ACTING ILLEGALLY. Note: (If
you do not see the full email address for the 6 members, just hit reply
To this email and they will show up.)

(Just in case you still haven't opened your PayPal account yet, use
this link to open one in your name),"https:// www.paypal.com"








Remember, all of this is ABSOLUTELY LEGAL! You are creating a service!
If you have any doubts, please refer to Title 18 Sec.1302 & 1241 of the
United States Postal laws.

STEP #3 - Adding Your Email Address.
After you send your six $1.00 payments, it's your turn to add your
email address to the list! Take the #1) email off the list that you see
above, move the other addresses up one (6 becomes 5 & 5 becomes 4, etc)
then put YOUR email address (the one used in your PayPal account) as
#6) on the list.**MAKE SURE THE EMAIL YOU SUPPLY IS EXACTLY AS IT
APPEARS IN YOUR PAYPAL ACCOUNT.**

STEP #4 - The Pure Joy of Receiving PayPal Money! You are now ready to
post your copy of this message, to at least 200 newsgroups, message
boards, etc. (I think there are close to 32,000 groups)All you need is
200, but remember, the more you post, the more money you make - as well
as everyone else on the list! In this situation your job is to let as
many people see this letter as possible. So they will make you and me
rich!!!! You can even start posting the moment your email is confirmed.
Payments will still appear in your PayPal account even while your bank
account is being confirmed.

HOW TO POST TO NEWSGROUPS & MESSAGE BOARDS
Step #1) You do not need to re-type this entire letter to do your own
posting. Simply put your CURSOR at the beginning of this letter and drag
your CURSOR to the bottom of this document, and select 'copy' from the
edit menu. This will copy the entire letter into your computer's
temporary memory.

Step #2) Open a blank 'Notepad' file and place your cursor at the top
of the blank page. From the 'Edit' menu select 'Paste'. This will paste
a copy of the letter into notepad so that you can add your email to the
list.

Step #3) Save your new Notepad file as a .txt file. If you want to do
your postings in different sittings, you'll always have this file to go
back to.

Step #4) Use Netscape or Internet Explorer and try searching for various
newsgroups, on-line forums, message boards, bulletin boards, chat
sites, discussions, discussion groups, online communities, etc.

EXAMPLE: go to any search engine like yahoo.com, google.com,
altavista.com, excite.com - then searchwith subjects like ?millionaire
message board? or ?money making message board? or?opportunity message
board? or ?money making discussions? or ?business bulletin board? or
?moneymaking forum? etc. You will find thousands &thousands of message
boards. Click them one by one then you will find the option to post a
new message.

Step #5) Visit these message boards and post this article as a new
message by highlighting the text of this letter and selecting 'Paste'
from the 'Edit' menu. Fill in the Subject, this will be the header that
everyone sees as they scroll thru the list of postings in a particular
group, click the post message button. You're done with your first
one! Congratulations! THAT'S IT!! All you have to do is jump to
different newsgroups and post away.

After you get the hang of it, it will take about 30 seconds for each
newsgroup! REMEMBER, THE MORE NEWSGROUPS AND/OR MESSAGE BOARDS YOU POST
IN, THE MORE MONEY YOU WILL MAKE!! BUT YOU HAVE TO POST A MINIMUM OF
200**That's it! You will begin receiving money within days!**JUST MAKE
SURE THE EMAIL YOU SUPPLY IS EXACTLY AS IT APPEARS ON PAYPAL.**$$$$$
NOW THE WHY PART: Out of 200 postings, say I receive only 5 replies (a
very low example). So then I Made $5.00 with my email at #6 on the
letter.

Now, each of the 5 persons who just sent me $1.00 make the MINIMUM 200
postings, each with my email at #5 and only 5 persons respond to each
of the original 5, that is another $25.00 for me,

now those 25 each make 200MINIMUM posts with my email at #4 and only 5
replies each, I will bring in an additional $125.00!

Now, those 125 persons turn around and post the MINIMUM 200 with my
email at #3 and only receive 5replies each, I will make an additional
$625.00!

OK, now here is the fun part, each of those 625 persons post a MINIMUM
200 letters with my email at #2 and they only receive 5 replies that
just made me $3,125.00!!! Those3,125 persons will all deliver this
message to 200newsgroups with my email at #1 and if still 5 persons per
200 newsgroups react I will receive $15,625.00!With an original
investment of only $6.00! AMAZING!!

When your email is no longer on the list, you just take l latest posting
in the newsgroups, and send out another $6.00 to emails on the list,
putting your email at number 6 again. And start posting again. The thing
to remember is, thousands of people all over the world are joining the
internet and reading these articles everyday, JUST LIKE YOU are now!!

Remember there is nothing to stop you copying and pasting this into an
email to send to your friends and family with your name at #6. That way
you will easily get recruits below you and I'm sure they will be
forever grateful for the opportunity you are providing them with.

Alternatively you can always paste this program into your own
website. There are loads of ways you can get your own domain free these
days and some really good free web advertising systems for you to get
involved in. Just do a search for them on google.

So can you afford $6?? And see if it really works?? I think so? People
have said, what if the plan is played out and no one sends you the
money? So what are the chances of that happening when there are tons of
new honest users and new honest people who are joining the internet and
newsgroups everyday and are willing to give it a try? Estimates are at
20,000 to 50,000 new users, every day, with thousands of those joining
the actual Internet.

Remember, play FAIRLY and HONESTLY and this will work. This really
isn't another one of those crazy scams! As long as people follow through
with sending out $6.00,it works!

With warm wishes, bless you and your loved ones,
"https:// www.paypal.com"$$$$$ REMEMBER, IT IS 100% LEGAL! DON'T PASS THIS
UP!

[Reply to this]

Re: Application-level Logging with the Zend Framework (#615)
By sdf on 2007-12-06 08:34:10

dfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddg
dfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddg
dfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddg
dfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddg
dfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddg
dfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddg
dfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddg
dfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddg
dfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddg
dfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddg
dfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddg
dfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddg
dfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddg
dfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddg
dfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddg
dfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddg
dfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddg
dfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddg
dfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddg
dfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddg
dfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddg
dfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddg
dfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddg
dfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddg
dfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddg
dfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddg
dfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddg
dfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddg
dfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddg
dfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddg
dfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddg
dfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddg
dfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddg
dfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddg
dfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddg
dfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddg
dfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddg
dfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddg
dfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddg
dfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddg
dfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddg
dfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddg
dfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddgdfddg

[Reply to this]

It is not correctly in new Zend Framework version (#629)
By conan1212 on 2008-03-14 23:13:51

To day I have found this tutorial for learning Zend Framework. But this tutorial write on old Zend Framework version. New version have something difference than this. Author should rewrite or update this tutorial plz.

[Reply to this]

Re: Application-level Logging with the Zend Framework (#635)
By Mike Bevz on 2008-04-17 18:26:08

Nice article.
Might be by any chance you've used Zend_Log with unittesting?

I've got the following error during test run:
Fatal error: Call to a member function shutdown() on a non-object in D:\...\library\Zend\Log.php on line 87

When I run website there are no errors.

My configuration
$writer = new Zend_Log_Writer_Stream(dirname(__FILE__).'/../logs/tourstart.log');
$logger = new Zend_Log($writer);

Zend_Registry::set('logger',$logger);

And all classes get access to logger getting the object from Zend_Registry.

Any ideas?

[Reply to this]

Re: Re: Application-level Logging with the Zend Framework (#640)
By Victor Shih on 2008-06-09 17:30:49

I was getting the "Call to a member function shutdown() on a non-object" issue too. My guess is shutdown() is getting called twice on destruction...

After instantiating your $logger object, try

$writer = null;

[Reply to this]

Index