Logs: O que comem, onde vivem e como se reproduzem.

4,176 views

Published on

Como utilizar os arquivos de log (servidor web, PHP) e como gerá-los, quais as configurações que afetam o comportamento da geração de log no PHP, como gerar mensagens melhores e arquiteturas comuns para manter e utilizar melhor o potencial dessas mensagens.

O vídeo da apresentação: https://www.youtube.com/watch?v=pGPyKxuUAAo

Published in: Software
1 Comment
15 Likes
Statistics
Notes
No Downloads
Views
Total views
4,176
On SlideShare
0
From Embeds
0
Number of Embeds
38
Actions
Shares
0
Downloads
10
Comments
1
Likes
15
Embeds 0
No embeds

No notes for slide

Logs: O que comem, onde vivem e como se reproduzem.

  1. 1. Logs @augustohp
  2. 2. Logs @augustohp O que comem, onde vivem e como se reproduzem.
  3. 3. –RFC 3164: The BSD syslog protocol “Since the beginning, life has relied upon the transmission of messages.”
  4. 4. Agenda • O que não são • O que comem • Onde vivem • Como se reproduzem
  5. 5. O que não são
  6. 6. –Hagrid “… são seres muito incompreendidos.”
  7. 7. • Enfeite • “Ferramentas” para liberar espaço em disco • Para apreciação pública
  8. 8. O que comem
  9. 9. O que comem Uma dieta configuravel com ênfase em compatibilidade
  10. 10. Texto
  11. 11. Inglês: ASCII < ISO < UTF
  12. 12. Arquivos simples
  13. 13. 1 registro por linha
  14. 14. Registro sempre formatado
  15. 15. Exemplo (Apache access.log)
  16. 16. 220.181.108.101 - - [20/Jun/2012:19:31:01 +0200] "GET / HTTP/1.1" 200 912 "-" "Mozilla/5.0 (compatible;! Baiduspider/2.0; +http://www.baidu.com/search/spider.html)"! 123.125.68.79 - - [20/Jun/2012:19:53:24 +0200] "GET / HTTP/1.1" 200 625 "-" "Mozilla/5.0 (compatible;! Baiduspider/2.0; +http://www.baidu.com/search/spider.html)"! 178.154.210.252 - - [20/Jun/2012:19:54:10 +0200] "GET /?C=S;O=A HTTP/1.1" 200 663 "-" "Mozilla/5.0! (compatible; YandexBot/3.0; +http://yandex.com/bots)"! 74.125.126.102 - - [20/Jun/2012:20:15:28 +0200] "GET / HTTP/1.1" 200 606 "http://www.google.com/url?! sa=t&rct=j&q=error&source=web&cd=1&ved=0CFAQFjAG&url=http%3A%2F%2Fwww.isrolab.com! %2F&ei=GxPiT5PsL4e04AHPtgE&usg=AFQjCNHnmjmdkUV584ORIpOXz7zAPX0UHQ" "Mozilla/4.0 (compatible; MSIE 7.0; Windows! NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; InfoPath.2; .NET! CLR 3.0.4506.2152; .NET CLR 3.5.30729)"! 74.125.126.103 - - [20/Jun/2012:20:15:29 +0200] "GET /icons/blank.gif HTTP/1.1" 200 383 "http://! www.isrolab.com/" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR! 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; InfoPath.2; .NET CLR 3.0.4506.2152; .NET CLR! 3.5.30729)"! 74.125.126.93 - - [20/Jun/2012:20:15:29 +0200] "GET /icons/folder.gif HTTP/1.1" 200 460 "http://! www.isrolab.com/" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR! 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; InfoPath.2; .NET CLR 3.0.4506.2152; .NET CLR! 3.5.30729)"! 74.125.126.82 - - [20/Jun/2012:20:15:30 +0200] "GET /favicon.ico HTTP/1.1" 404 449 "-" "Mozilla/4.0! (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR! 3.5.21022; InfoPath.2; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)"! 184.82.92.239 - - [20/Jun/2012:21:03:44 +0200] "GET /logs/access.log HTTP/1.1" 200 2519 "http://isrolab.com/"! "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT! 5.1; SV1) ; .NET CLR 3.5.30729)"! 173.236.21.106 - - [20/Jun/2012:21:16:22 +0200] "GET /robots.txt HTTP/1.0" 404 488 "-" "Mozilla/5.0! (compatible; MJ12bot/v1.4.3; http://www.majestic12.co.uk/bot.php?+)"! 173.236.21.106 - - [20/Jun/2012:21:16:23 +0200] "GET / HTTP/1.0" 200 621 "-" "Mozilla/5.0 (compatible;! MJ12bot/v1.4.3; http://www.majestic12.co.uk/bot.php?+)"! 213.186.122.2 - - [20/Jun/2012:21:27:53 +0200] "GET /logs/?C=D;O=D HTTP/1.1" 200 658 "-" "Mozilla/5.0! (compatible; AhrefsBot/3.0; +http://ahrefs.com/robot/)"! 66.249.72.65 - - [20/Jun/2012:21:28:00 +0200] "GET /robots.txt HTTP/1.1" 404 508 "-" "Mozilla/5.0 (compatible;! Googlebot/2.1; +http://www.google.com/bot.html)"! 66.249.72.65 - - [20/Jun/2012:21:28:00 +0200] "GET /logs/ HTTP/1.1" 200 723 "-" "Mozilla/5.0 (compatible;! Googlebot/2.1; +http://www.google.com/bot.html)"! 123.125.71.44 - - [20/Jun/2012:21:38:57 +0200] "GET / HTTP/1.1" 200 913 "-" "Mozilla/5.0 (compatible;! Baiduspider/2.0; +http://www.baidu.com/search/spider.html)"! 220.181.108.88 - - [20/Jun/2012:21:39:48 +0200] "GET / HTTP/1.1" 200 913 "-" "Mozilla/5.0 (compatible;! Baiduspider/2.0; +http://www.baidu.com/search/spider.html)"! 178.154.210.252 - - [20/Jun/2012:21:45:12 +0200] "GET /logs/ HTTP/1.1" 200 728 "-" "Mozilla/5.0 (compatible;! YandexBot/3.0; +http://yandex.com/bots)"! 139.18.2.209 - - [20/Jun/2012:22:31:43 +0200] "GET / HTTP/1.1" 200 912 "-" "findlinks/2.6 (+http://! wortschatz.uni-leipzig.de/findlinks/)"!
  17. 17. 220.181.108.101 - - [20/Jun/2012:19:31:01 +0200] "GET / HTTP/1.1" 200 912 "-" "Mozilla/5.0 (compatible;! Baiduspider/2.0; +http://www.baidu.com/search/spider.html)"! 123.125.68.79 - - [20/Jun/2012:19:53:24 +0200] "GET / HTTP/1.1" 200 625 "-" "Mozilla/5.0 (compatible;! Baiduspider/2.0; +http://www.baidu.com/search/spider.html)"! 178.154.210.252 - - [20/Jun/2012:19:54:10 +0200] "GET /?C=S;O=A HTTP/1.1" 200 663 "-" "Mozilla/5.0! (compatible; YandexBot/3.0; +http://yandex.com/bots)"! 74.125.126.102 - - [20/Jun/2012:20:15:28 +0200] "GET / HTTP/1.1" 200 606 "http://www.google.com/url?! sa=t&rct=j&q=error&source=web&cd=1&ved=0CFAQFjAG&url=http%3A%2F%2Fwww.isrolab.com! %2F&ei=GxPiT5PsL4e04AHPtgE&usg=AFQjCNHnmjmdkUV584ORIpOXz7zAPX0UHQ" "Mozilla/4.0 (compatible; MSIE 7.0; Windows! NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; InfoPath.2; .NET! CLR 3.0.4506.2152; .NET CLR 3.5.30729)"! 74.125.126.103 - - [20/Jun/2012:20:15:29 +0200] "GET /icons/blank.gif HTTP/1.1" 200 383 "http://! www.isrolab.com/" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR! 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; InfoPath.2; .NET CLR 3.0.4506.2152; .NET CLR! 3.5.30729)"! 74.125.126.93 - - [20/Jun/2012:20:15:29 +0200] "GET /icons/folder.gif HTTP/1.1" 200 460 "http://! www.isrolab.com/" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR! 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; InfoPath.2; .NET CLR 3.0.4506.2152; .NET CLR! 3.5.30729)"! 74.125.126.82 - - [20/Jun/2012:20:15:30 +0200] "GET /favicon.ico HTTP/1.1" 404 449 "-" "Mozilla/4.0! (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR! 3.5.21022; InfoPath.2; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)"! 184.82.92.239 - - [20/Jun/2012:21:03:44 +0200] "GET /logs/access.log HTTP/1.1" 200 2519 "http://isrolab.com/"! "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT! 5.1; SV1) ; .NET CLR 3.5.30729)"! 173.236.21.106 - - [20/Jun/2012:21:16:22 +0200] "GET /robots.txt HTTP/1.0" 404 488 "-" "Mozilla/5.0! (compatible; MJ12bot/v1.4.3; http://www.majestic12.co.uk/bot.php?+)"! 173.236.21.106 - - [20/Jun/2012:21:16:23 +0200] "GET / HTTP/1.0" 200 621 "-" "Mozilla/5.0 (compatible;! MJ12bot/v1.4.3; http://www.majestic12.co.uk/bot.php?+)"! 213.186.122.2 - - [20/Jun/2012:21:27:53 +0200] "GET /logs/?C=D;O=D HTTP/1.1" 200 658 "-" "Mozilla/5.0! (compatible; AhrefsBot/3.0; +http://ahrefs.com/robot/)"! 66.249.72.65 - - [20/Jun/2012:21:28:00 +0200] "GET /robots.txt HTTP/1.1" 404 508 "-" "Mozilla/5.0 (compatible;! Googlebot/2.1; +http://www.google.com/bot.html)"! 66.249.72.65 - - [20/Jun/2012:21:28:00 +0200] "GET /logs/ HTTP/1.1" 200 723 "-" "Mozilla/5.0 (compatible;! Googlebot/2.1; +http://www.google.com/bot.html)"! 123.125.71.44 - - [20/Jun/2012:21:38:57 +0200] "GET / HTTP/1.1" 200 913 "-" "Mozilla/5.0 (compatible;! Baiduspider/2.0; +http://www.baidu.com/search/spider.html)"! 220.181.108.88 - - [20/Jun/2012:21:39:48 +0200] "GET / HTTP/1.1" 200 913 "-" "Mozilla/5.0 (compatible;! Baiduspider/2.0; +http://www.baidu.com/search/spider.html)"! 178.154.210.252 - - [20/Jun/2012:21:45:12 +0200] "GET /logs/ HTTP/1.1" 200 728 "-" "Mozilla/5.0 (compatible;! YandexBot/3.0; +http://yandex.com/bots)"! 139.18.2.209 - - [20/Jun/2012:22:31:43 +0200] "GET / HTTP/1.1" 200 912 "-" "findlinks/2.6 (+http://! wortschatz.uni-leipzig.de/findlinks/)"! 1 registro por linha …
  18. 18. 220.181.108.101 - - [20/Jun/2012:19:31:01 +0200] "GET / HTTP/1.1" 200 912 "-" "Mozilla/5.0 (compatible;! Baiduspider/2.0; +http://www.baidu.com/search/spider.html)"! 123.125.68.79 - - [20/Jun/2012:19:53:24 +0200] "GET / HTTP/1.1" 200 625 "-" "Mozilla/5.0 (compatible;! Baiduspider/2.0; +http://www.baidu.com/search/spider.html)"! 178.154.210.252 - - [20/Jun/2012:19:54:10 +0200] "GET /?C=S;O=A HTTP/1.1" 200 663 "-" "Mozilla/5.0! (compatible; YandexBot/3.0; +http://yandex.com/bots)"! 74.125.126.102 - - [20/Jun/2012:20:15:28 +0200] "GET / HTTP/1.1" 200 606 "http://www.google.com/url?! sa=t&rct=j&q=error&source=web&cd=1&ved=0CFAQFjAG&url=http%3A%2F%2Fwww.isrolab.com! %2F&ei=GxPiT5PsL4e04AHPtgE&usg=AFQjCNHnmjmdkUV584ORIpOXz7zAPX0UHQ" "Mozilla/4.0 (compatible; MSIE 7.0; Windows! NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; InfoPath.2; .NET! CLR 3.0.4506.2152; .NET CLR 3.5.30729)"! 74.125.126.103 - - [20/Jun/2012:20:15:29 +0200] "GET /icons/blank.gif HTTP/1.1" 200 383 "http://! www.isrolab.com/" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR! 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; InfoPath.2; .NET CLR 3.0.4506.2152; .NET CLR! 3.5.30729)"! 74.125.126.93 - - [20/Jun/2012:20:15:29 +0200] "GET /icons/folder.gif HTTP/1.1" 200 460 "http://! www.isrolab.com/" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR! 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; InfoPath.2; .NET CLR 3.0.4506.2152; .NET CLR! 3.5.30729)"! 74.125.126.82 - - [20/Jun/2012:20:15:30 +0200] "GET /favicon.ico HTTP/1.1" 404 449 "-" "Mozilla/4.0! (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR! 3.5.21022; InfoPath.2; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)"! 184.82.92.239 - - [20/Jun/2012:21:03:44 +0200] "GET /logs/access.log HTTP/1.1" 200 2519 "http://isrolab.com/"! "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT! 5.1; SV1) ; .NET CLR 3.5.30729)"! 173.236.21.106 - - [20/Jun/2012:21:16:22 +0200] "GET /robots.txt HTTP/1.0" 404 488 "-" "Mozilla/5.0! (compatible; MJ12bot/v1.4.3; http://www.majestic12.co.uk/bot.php?+)"! 173.236.21.106 - - [20/Jun/2012:21:16:23 +0200] "GET / HTTP/1.0" 200 621 "-" "Mozilla/5.0 (compatible;! MJ12bot/v1.4.3; http://www.majestic12.co.uk/bot.php?+)"! 213.186.122.2 - - [20/Jun/2012:21:27:53 +0200] "GET /logs/?C=D;O=D HTTP/1.1" 200 658 "-" "Mozilla/5.0! (compatible; AhrefsBot/3.0; +http://ahrefs.com/robot/)"! 66.249.72.65 - - [20/Jun/2012:21:28:00 +0200] "GET /robots.txt HTTP/1.1" 404 508 "-" "Mozilla/5.0 (compatible;! Googlebot/2.1; +http://www.google.com/bot.html)"! 66.249.72.65 - - [20/Jun/2012:21:28:00 +0200] "GET /logs/ HTTP/1.1" 200 723 "-" "Mozilla/5.0 (compatible;! Googlebot/2.1; +http://www.google.com/bot.html)"! 123.125.71.44 - - [20/Jun/2012:21:38:57 +0200] "GET / HTTP/1.1" 200 913 "-" "Mozilla/5.0 (compatible;! Baiduspider/2.0; +http://www.baidu.com/search/spider.html)"! 220.181.108.88 - - [20/Jun/2012:21:39:48 +0200] "GET / HTTP/1.1" 200 913 "-" "Mozilla/5.0 (compatible;! Baiduspider/2.0; +http://www.baidu.com/search/spider.html)"! 178.154.210.252 - - [20/Jun/2012:21:45:12 +0200] "GET /logs/ HTTP/1.1" 200 728 "-" "Mozilla/5.0 (compatible;! YandexBot/3.0; +http://yandex.com/bots)"! 139.18.2.209 - - [20/Jun/2012:22:31:43 +0200] "GET / HTTP/1.1" 200 912 "-" "findlinks/2.6 (+http://! wortschatz.uni-leipzig.de/findlinks/)"! 1 registro por linha … … ou “quebra de linha”.
  19. 19. 220.181.108.101 - - [20/Jun/2012:19:31:01 +0200] "GET / HTTP/1.1" 200 912 "-" "Mozilla/5.0 (compatible;! Baiduspider/2.0; +http://www.baidu.com/search/spider.html)"! 123.125.68.79 - - [20/Jun/2012:19:53:24 +0200] "GET / HTTP/1.1" 200 625 "-" "Mozilla/5.0 (compatible;! Baiduspider/2.0; +http://www.baidu.com/search/spider.html)"! 178.154.210.252 - - [20/Jun/2012:19:54:10 +0200] "GET /?C=S;O=A HTTP/1.1" 200 663 "-" "Mozilla/5.0! (compatible; YandexBot/3.0; +http://yandex.com/bots)"! 74.125.126.102 - - [20/Jun/2012:20:15:28 +0200] "GET / HTTP/1.1" 200 606 "http://www.google.com/url?! sa=t&rct=j&q=error&source=web&cd=1&ved=0CFAQFjAG&url=http%3A%2F%2Fwww.isrolab.com! %2F&ei=GxPiT5PsL4e04AHPtgE&usg=AFQjCNHnmjmdkUV584ORIpOXz7zAPX0UHQ" "Mozilla/4.0 (compatible; MSIE 7.0; Windows! NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; InfoPath.2; .NET! CLR 3.0.4506.2152; .NET CLR 3.5.30729)"! 74.125.126.103 - - [20/Jun/2012:20:15:29 +0200] "GET /icons/blank.gif HTTP/1.1" 200 383 "http://! www.isrolab.com/" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR! 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; InfoPath.2; .NET CLR 3.0.4506.2152; .NET CLR! 3.5.30729)"! 74.125.126.93 - - [20/Jun/2012:20:15:29 +0200] "GET /icons/folder.gif HTTP/1.1" 200 460 "http://! www.isrolab.com/" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR! 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; InfoPath.2; .NET CLR 3.0.4506.2152; .NET CLR! 3.5.30729)"! 74.125.126.82 - - [20/Jun/2012:20:15:30 +0200] "GET /favicon.ico HTTP/1.1" 404 449 "-" "Mozilla/4.0! (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR! 3.5.21022; InfoPath.2; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)"! 184.82.92.239 - - [20/Jun/2012:21:03:44 +0200] "GET /logs/access.log HTTP/1.1" 200 2519 "http://isrolab.com/"! "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT! 5.1; SV1) ; .NET CLR 3.5.30729)"! 173.236.21.106 - - [20/Jun/2012:21:16:22 +0200] "GET /robots.txt HTTP/1.0" 404 488 "-" "Mozilla/5.0! (compatible; MJ12bot/v1.4.3; http://www.majestic12.co.uk/bot.php?+)"! 173.236.21.106 - - [20/Jun/2012:21:16:23 +0200] "GET / HTTP/1.0" 200 621 "-" "Mozilla/5.0 (compatible;! MJ12bot/v1.4.3; http://www.majestic12.co.uk/bot.php?+)"! 213.186.122.2 - - [20/Jun/2012:21:27:53 +0200] "GET /logs/?C=D;O=D HTTP/1.1" 200 658 "-" "Mozilla/5.0! (compatible; AhrefsBot/3.0; +http://ahrefs.com/robot/)"! 66.249.72.65 - - [20/Jun/2012:21:28:00 +0200] "GET /robots.txt HTTP/1.1" 404 508 "-" "Mozilla/5.0 (compatible;! Googlebot/2.1; +http://www.google.com/bot.html)"! 66.249.72.65 - - [20/Jun/2012:21:28:00 +0200] "GET /logs/ HTTP/1.1" 200 723 "-" "Mozilla/5.0 (compatible;! Googlebot/2.1; +http://www.google.com/bot.html)"! 123.125.71.44 - - [20/Jun/2012:21:38:57 +0200] "GET / HTTP/1.1" 200 913 "-" "Mozilla/5.0 (compatible;! Baiduspider/2.0; +http://www.baidu.com/search/spider.html)"! 220.181.108.88 - - [20/Jun/2012:21:39:48 +0200] "GET / HTTP/1.1" 200 913 "-" "Mozilla/5.0 (compatible;! Baiduspider/2.0; +http://www.baidu.com/search/spider.html)"! 178.154.210.252 - - [20/Jun/2012:21:45:12 +0200] "GET /logs/ HTTP/1.1" 200 728 "-" "Mozilla/5.0 (compatible;! YandexBot/3.0; +http://yandex.com/bots)"! 139.18.2.209 - - [20/Jun/2012:22:31:43 +0200] "GET / HTTP/1.1" 200 912 "-" "findlinks/2.6 (+http://! wortschatz.uni-leipzig.de/findlinks/)"! Separadas por espaço…
  20. 20. 220.181.108.101 - - [20/Jun/2012:19:31:01 +0200] "GET / HTTP/1.1" 200 912 "-" "Mozilla/5.0 (compatible;! Baiduspider/2.0; +http://www.baidu.com/search/spider.html)"! 123.125.68.79 - - [20/Jun/2012:19:53:24 +0200] "GET / HTTP/1.1" 200 625 "-" "Mozilla/5.0 (compatible;! Baiduspider/2.0; +http://www.baidu.com/search/spider.html)"! 178.154.210.252 - - [20/Jun/2012:19:54:10 +0200] "GET /?C=S;O=A HTTP/1.1" 200 663 "-" "Mozilla/5.0! (compatible; YandexBot/3.0; +http://yandex.com/bots)"! 74.125.126.102 - - [20/Jun/2012:20:15:28 +0200] "GET / HTTP/1.1" 200 606 "http://www.google.com/url?! sa=t&rct=j&q=error&source=web&cd=1&ved=0CFAQFjAG&url=http%3A%2F%2Fwww.isrolab.com! %2F&ei=GxPiT5PsL4e04AHPtgE&usg=AFQjCNHnmjmdkUV584ORIpOXz7zAPX0UHQ" "Mozilla/4.0 (compatible; MSIE 7.0; Windows! NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; InfoPath.2; .NET! CLR 3.0.4506.2152; .NET CLR 3.5.30729)"! 74.125.126.103 - - [20/Jun/2012:20:15:29 +0200] "GET /icons/blank.gif HTTP/1.1" 200 383 "http://! www.isrolab.com/" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR! 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; InfoPath.2; .NET CLR 3.0.4506.2152; .NET CLR! 3.5.30729)"! 74.125.126.93 - - [20/Jun/2012:20:15:29 +0200] "GET /icons/folder.gif HTTP/1.1" 200 460 "http://! www.isrolab.com/" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR! 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; InfoPath.2; .NET CLR 3.0.4506.2152; .NET CLR! 3.5.30729)"! 74.125.126.82 - - [20/Jun/2012:20:15:30 +0200] "GET /favicon.ico HTTP/1.1" 404 449 "-" "Mozilla/4.0! (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR! 3.5.21022; InfoPath.2; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)"! 184.82.92.239 - - [20/Jun/2012:21:03:44 +0200] "GET /logs/access.log HTTP/1.1" 200 2519 "http://isrolab.com/"! "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT! 5.1; SV1) ; .NET CLR 3.5.30729)"! 173.236.21.106 - - [20/Jun/2012:21:16:22 +0200] "GET /robots.txt HTTP/1.0" 404 488 "-" "Mozilla/5.0! (compatible; MJ12bot/v1.4.3; http://www.majestic12.co.uk/bot.php?+)"! 173.236.21.106 - - [20/Jun/2012:21:16:23 +0200] "GET / HTTP/1.0" 200 621 "-" "Mozilla/5.0 (compatible;! MJ12bot/v1.4.3; http://www.majestic12.co.uk/bot.php?+)"! 213.186.122.2 - - [20/Jun/2012:21:27:53 +0200] "GET /logs/?C=D;O=D HTTP/1.1" 200 658 "-" "Mozilla/5.0! (compatible; AhrefsBot/3.0; +http://ahrefs.com/robot/)"! 66.249.72.65 - - [20/Jun/2012:21:28:00 +0200] "GET /robots.txt HTTP/1.1" 404 508 "-" "Mozilla/5.0 (compatible;! Googlebot/2.1; +http://www.google.com/bot.html)"! 66.249.72.65 - - [20/Jun/2012:21:28:00 +0200] "GET /logs/ HTTP/1.1" 200 723 "-" "Mozilla/5.0 (compatible;! Googlebot/2.1; +http://www.google.com/bot.html)"! 123.125.71.44 - - [20/Jun/2012:21:38:57 +0200] "GET / HTTP/1.1" 200 913 "-" "Mozilla/5.0 (compatible;! Baiduspider/2.0; +http://www.baidu.com/search/spider.html)"! 220.181.108.88 - - [20/Jun/2012:21:39:48 +0200] "GET / HTTP/1.1" 200 913 "-" "Mozilla/5.0 (compatible;! Baiduspider/2.0; +http://www.baidu.com/search/spider.html)"! 178.154.210.252 - - [20/Jun/2012:21:45:12 +0200] "GET /logs/ HTTP/1.1" 200 728 "-" "Mozilla/5.0 (compatible;! YandexBot/3.0; +http://yandex.com/bots)"! 139.18.2.209 - - [20/Jun/2012:22:31:43 +0200] "GET / HTTP/1.1" 200 912 "-" "findlinks/2.6 (+http://! wortschatz.uni-leipzig.de/findlinks/)"! … ou entre “ ” (aspas) … Separadas por espaço…
  21. 21. 220.181.108.101 - - [20/Jun/2012:19:31:01 +0200] "GET / HTTP/1.1" 200 912 "-" "Mozilla/5.0 (compatible;! Baiduspider/2.0; +http://www.baidu.com/search/spider.html)"! 123.125.68.79 - - [20/Jun/2012:19:53:24 +0200] "GET / HTTP/1.1" 200 625 "-" "Mozilla/5.0 (compatible;! Baiduspider/2.0; +http://www.baidu.com/search/spider.html)"! 178.154.210.252 - - [20/Jun/2012:19:54:10 +0200] "GET /?C=S;O=A HTTP/1.1" 200 663 "-" "Mozilla/5.0! (compatible; YandexBot/3.0; +http://yandex.com/bots)"! 74.125.126.102 - - [20/Jun/2012:20:15:28 +0200] "GET / HTTP/1.1" 200 606 "http://www.google.com/url?! sa=t&rct=j&q=error&source=web&cd=1&ved=0CFAQFjAG&url=http%3A%2F%2Fwww.isrolab.com! %2F&ei=GxPiT5PsL4e04AHPtgE&usg=AFQjCNHnmjmdkUV584ORIpOXz7zAPX0UHQ" "Mozilla/4.0 (compatible; MSIE 7.0; Windows! NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; InfoPath.2; .NET! CLR 3.0.4506.2152; .NET CLR 3.5.30729)"! 74.125.126.103 - - [20/Jun/2012:20:15:29 +0200] "GET /icons/blank.gif HTTP/1.1" 200 383 "http://! www.isrolab.com/" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR! 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; InfoPath.2; .NET CLR 3.0.4506.2152; .NET CLR! 3.5.30729)"! 74.125.126.93 - - [20/Jun/2012:20:15:29 +0200] "GET /icons/folder.gif HTTP/1.1" 200 460 "http://! www.isrolab.com/" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR! 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; InfoPath.2; .NET CLR 3.0.4506.2152; .NET CLR! 3.5.30729)"! 74.125.126.82 - - [20/Jun/2012:20:15:30 +0200] "GET /favicon.ico HTTP/1.1" 404 449 "-" "Mozilla/4.0! (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR! 3.5.21022; InfoPath.2; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)"! 184.82.92.239 - - [20/Jun/2012:21:03:44 +0200] "GET /logs/access.log HTTP/1.1" 200 2519 "http://isrolab.com/"! "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT! 5.1; SV1) ; .NET CLR 3.5.30729)"! 173.236.21.106 - - [20/Jun/2012:21:16:22 +0200] "GET /robots.txt HTTP/1.0" 404 488 "-" "Mozilla/5.0! (compatible; MJ12bot/v1.4.3; http://www.majestic12.co.uk/bot.php?+)"! 173.236.21.106 - - [20/Jun/2012:21:16:23 +0200] "GET / HTTP/1.0" 200 621 "-" "Mozilla/5.0 (compatible;! MJ12bot/v1.4.3; http://www.majestic12.co.uk/bot.php?+)"! 213.186.122.2 - - [20/Jun/2012:21:27:53 +0200] "GET /logs/?C=D;O=D HTTP/1.1" 200 658 "-" "Mozilla/5.0! (compatible; AhrefsBot/3.0; +http://ahrefs.com/robot/)"! 66.249.72.65 - - [20/Jun/2012:21:28:00 +0200] "GET /robots.txt HTTP/1.1" 404 508 "-" "Mozilla/5.0 (compatible;! Googlebot/2.1; +http://www.google.com/bot.html)"! 66.249.72.65 - - [20/Jun/2012:21:28:00 +0200] "GET /logs/ HTTP/1.1" 200 723 "-" "Mozilla/5.0 (compatible;! Googlebot/2.1; +http://www.google.com/bot.html)"! 123.125.71.44 - - [20/Jun/2012:21:38:57 +0200] "GET / HTTP/1.1" 200 913 "-" "Mozilla/5.0 (compatible;! Baiduspider/2.0; +http://www.baidu.com/search/spider.html)"! 220.181.108.88 - - [20/Jun/2012:21:39:48 +0200] "GET / HTTP/1.1" 200 913 "-" "Mozilla/5.0 (compatible;! Baiduspider/2.0; +http://www.baidu.com/search/spider.html)"! 178.154.210.252 - - [20/Jun/2012:21:45:12 +0200] "GET /logs/ HTTP/1.1" 200 728 "-" "Mozilla/5.0 (compatible;! YandexBot/3.0; +http://yandex.com/bots)"! 139.18.2.209 - - [20/Jun/2012:22:31:43 +0200] "GET / HTTP/1.1" 200 912 "-" "findlinks/2.6 (+http://! wortschatz.uni-leipzig.de/findlinks/)"! … ou entre “ ” (aspas) … Separadas por espaço… … ou [ ] (colchetes).
  22. 22. 220.181.108.101 - - [20/Jun/2012:19:31:01 +0200] "GET / HTTP/1.1" 200 912 "-" "Mozilla/5.0 (compatible;! Baiduspider/2.0; +http://www.baidu.com/search/spider.html)"! 123.125.68.79 - - [20/Jun/2012:19:53:24 +0200] "GET / HTTP/1.1" 200 625 "-" "Mozilla/5.0 (compatible;! Baiduspider/2.0; +http://www.baidu.com/search/spider.html)"! 178.154.210.252 - - [20/Jun/2012:19:54:10 +0200] "GET /?C=S;O=A HTTP/1.1" 200 663 "-" "Mozilla/5.0! (compatible; YandexBot/3.0; +http://yandex.com/bots)"! 74.125.126.102 - - [20/Jun/2012:20:15:28 +0200] "GET / HTTP/1.1" 200 606 "http://www.google.com/url?! sa=t&rct=j&q=error&source=web&cd=1&ved=0CFAQFjAG&url=http%3A%2F%2Fwww.isrolab.com! %2F&ei=GxPiT5PsL4e04AHPtgE&usg=AFQjCNHnmjmdkUV584ORIpOXz7zAPX0UHQ" "Mozilla/4.0 (compatible; MSIE 7.0; Windows! NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; InfoPath.2; .NET! CLR 3.0.4506.2152; .NET CLR 3.5.30729)"! 74.125.126.103 - - [20/Jun/2012:20:15:29 +0200] "GET /icons/blank.gif HTTP/1.1" 200 383 "http://! www.isrolab.com/" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR! 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; InfoPath.2; .NET CLR 3.0.4506.2152; .NET CLR! 3.5.30729)"! 74.125.126.93 - - [20/Jun/2012:20:15:29 +0200] "GET /icons/folder.gif HTTP/1.1" 200 460 "http://! www.isrolab.com/" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR! 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; InfoPath.2; .NET CLR 3.0.4506.2152; .NET CLR! 3.5.30729)"! 74.125.126.82 - - [20/Jun/2012:20:15:30 +0200] "GET /favicon.ico HTTP/1.1" 404 449 "-" "Mozilla/4.0! (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR! 3.5.21022; InfoPath.2; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)"! 184.82.92.239 - - [20/Jun/2012:21:03:44 +0200] "GET /logs/access.log HTTP/1.1" 200 2519 "http://isrolab.com/"! "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT! 5.1; SV1) ; .NET CLR 3.5.30729)"! 173.236.21.106 - - [20/Jun/2012:21:16:22 +0200] "GET /robots.txt HTTP/1.0" 404 488 "-" "Mozilla/5.0! (compatible; MJ12bot/v1.4.3; http://www.majestic12.co.uk/bot.php?+)"! 173.236.21.106 - - [20/Jun/2012:21:16:23 +0200] "GET / HTTP/1.0" 200 621 "-" "Mozilla/5.0 (compatible;! MJ12bot/v1.4.3; http://www.majestic12.co.uk/bot.php?+)"! 213.186.122.2 - - [20/Jun/2012:21:27:53 +0200] "GET /logs/?C=D;O=D HTTP/1.1" 200 658 "-" "Mozilla/5.0! (compatible; AhrefsBot/3.0; +http://ahrefs.com/robot/)"! 66.249.72.65 - - [20/Jun/2012:21:28:00 +0200] "GET /robots.txt HTTP/1.1" 404 508 "-" "Mozilla/5.0 (compatible;! Googlebot/2.1; +http://www.google.com/bot.html)"! 66.249.72.65 - - [20/Jun/2012:21:28:00 +0200] "GET /logs/ HTTP/1.1" 200 723 "-" "Mozilla/5.0 (compatible;! Googlebot/2.1; +http://www.google.com/bot.html)"! 123.125.71.44 - - [20/Jun/2012:21:38:57 +0200] "GET / HTTP/1.1" 200 913 "-" "Mozilla/5.0 (compatible;! Baiduspider/2.0; +http://www.baidu.com/search/spider.html)"! 220.181.108.88 - - [20/Jun/2012:21:39:48 +0200] "GET / HTTP/1.1" 200 913 "-" "Mozilla/5.0 (compatible;! Baiduspider/2.0; +http://www.baidu.com/search/spider.html)"! 178.154.210.252 - - [20/Jun/2012:21:45:12 +0200] "GET /logs/ HTTP/1.1" 200 728 "-" "Mozilla/5.0 (compatible;! YandexBot/3.0; +http://yandex.com/bots)"! 139.18.2.209 - - [20/Jun/2012:22:31:43 +0200] "GET / HTTP/1.1" 200 912 "-" "findlinks/2.6 (+http://! wortschatz.uni-leipzig.de/findlinks/)"! Informações ausentes como um - (hífem).
  23. 23. Como estudar/usar
  24. 24. wc word, line, character and byte count
  25. 25. #!/bin/bash [~/Apache] $ wc -l access.log 65063 access.log
  26. 26. head display first lines of a file
  27. 27. #!/bin/bash [~/Apache]$ head -n 1 access.log 1.202.218.8 - - [20/Jun/2012:19:05:12 +0200] "GET / robots.txt HTTP/1.0" 404 492 "-" ""Mozilla/5.0"
  28. 28. tail display the last lines of a file
  29. 29. #!/bin/bash [~/Apache] $ tail -n 1 access.log 192.210.213.91 - - [08/Jun/2014:19:42:34 -0700] "GET /logs/ access.log HTTP/1.1" 200 4663 "http://redlug.com/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/536.30.1 (KHTML, like Gecko) Version/6.0.5 Safari/536.30.1" "redlug.com"
  30. 30. #!/bin/bash [~/Apache] $ tail -n 1 -f access.log 192.210.213.91 - - [08/Jun/2014:19:42:34 -0700] "GET /logs/ access.log HTTP/1.1" 200 4663 "http://redlug.com/" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_4) AppleWebKit/536.30.1 (KHTML, like Gecko) Version/6.0.5 Safari/536.30.1" "redlug.com"
  31. 31. grep print lines matching a pattern
  32. 32. #!/bin/bash [~/Apache] $ grep "HTTP/1.1" access.log | wc -l 52129 !
  33. 33. #!/bin/bash [~/Apache] $ grep "HTTP/1.1" access.log | wc -l 52129 ! [~/Apache] $ grep "HTTP/1.0" access.log | wc -l 13007 !
  34. 34. #!/bin/bash [~/Apache] $ grep "HTTP/1.1" access.log | wc -l 52129 ! [~/Apache] $ grep "HTTP/1.0" access.log | wc -l 13007 ! [~/Apache] $ grep -v "HTTP/1.1" access.log | grep -v “HTTP/1.0" 114.66.65.89 - - [24/Dec/2012:07:46:27 +0100] "GET /logs/ access.log vxc2xa4Nxd41.0" 200 1963700 "http:// www.isrolab.com/" "Mozilla/5.0 (Windows NT 6.1; rv: 2.0b7pre) Gecko/20100921 Firefox/4.0b7pre" !
  35. 35. #!/bin/bash [~/Apache] $ grep "HTTP/1.1" access.log | wc -l 52129 ! [~/Apache] $ grep "HTTP/1.0" access.log | wc -l 13007 ! [~/Apache] $ grep -v "HTTP/1.1" access.log | grep -v “HTTP/1.0" 114.66.65.89 - - [24/Dec/2012:07:46:27 +0100] "GET /logs/ access.log vxc2xa4Nxd41.0" 200 1963700 "http:// www.isrolab.com/" "Mozilla/5.0 (Windows NT 6.1; rv: 2.0b7pre) Gecko/20100921 Firefox/4.0b7pre" !
  36. 36. awk pattern-directed scanning and processing language
  37. 37. #!/bin/bash [~/Apache]$ head -n 1 access.log 1.202.218.8 - - [20/Jun/2012:19:05:12 +0200] "GET / robots.txt HTTP/1.0" 404 492 "-" “"Mozilla/5.0" !
  38. 38. #!/bin/bash [~/Apache]$ head -n 1 access.log 1.202.218.8 - - [20/Jun/2012:19:05:12 +0200] "GET / robots.txt HTTP/1.0" 404 492 "-" “"Mozilla/5.0" ! [~/Apache]$ head -n 1 access.log | awk '{print $1}' 1.202.218.8
  39. 39. #!/bin/bash [~/Apache]$ head -n 1 access.log 1.202.218.8 - - [20/Jun/2012:19:05:12 +0200] "GET / robots.txt HTTP/1.0" 404 492 "-" “"Mozilla/5.0" ! [~/Apache]$ head -n 1 access.log | awk '{print $1}' 1.202.218.8 ! [~/Apache] $ awk '/access.log/' access.log | awk '{print $1}' 31.184.238.164 31.184.238.164 77.27.18.67 31.184.238.164 31.184.238.164 31.184.238.164 31.184.238.164 31.184.238.164
  40. 40. #!/bin/bash [~/Apache] $ awk '/access.log/' access.log | awk '{print $1,$6,$7,$8}' 31.184.238.164 "GET /logs/access.log HTTP/1.0" 31.184.238.164 "GET /logs/access.log HTTP/1.0" 77.27.18.67 "GET /logs/access.log HTTP/1.1" 31.184.238.164 "GET /logs/access.log HTTP/1.0" 31.184.238.164 "GET /logs/access.log HTTP/1.0" 31.184.238.164 "GET /logs/access.log HTTP/1.0"
  41. 41. uniq / sort
  42. 42. #!/bin/bash [~/Apache] $ awk '/access.log/' access.log | awk '{print $1}' | sort | uniq -c | sort -r
  43. 43. #!/bin/bash [~/Apache] $ awk '/access.log/' access.log | awk '{print $1}' | sort | uniq -c | sort -r ! 41 31.184.238.164 2 192.210.213.91 1 77.27.18.67 1 192.227.243.66 1 189.120.185.4
  44. 44. Onde vivem
  45. 45. /var/log Seu administrador de sistemas agradece.
  46. 46. Seres famosos (Debian) • /var/log/apache2/access.log • /var/log/apache2/error.log • /var/log/messages • /var/log/mysql.err
  47. 47. Como se reproduzem
  48. 48. PHP E seus métodos anticoncepcionais
  49. 49. display_errors Os erros devem ser exibidos para o usuário?
  50. 50. ini_set(‘display_errors’, ‘On’) Exibe os erros ao usuário. O PHP respeita o cabeçalho HTTP “Content-Type”.
  51. 51. ini_set(‘display_errors’, 1) Também é interpretado como “On”.
  52. 52. ini_set(‘display_errors’, true) Também é interpretado como “On”.
  53. 53. $isDev = true; ini_set(‘display_errors’, $isDev) Também é interpretado como “On”.
  54. 54. $isDev =“1 caralhinho”; ini_set(‘display_errors’, $isDev) Isso também é “On”.
  55. 55. $isDev =“2 caralhinhos”; ini_set(‘display_errors’, $isDev) Isso é “Off”.
  56. 56. log_errors Os erros devem ser mantidos?
  57. 57. log_errors Os erros devem ser mantidos? Siiiiiiiiiiiim!
  58. 58. ini_set(‘log_errors’, ‘1 caralhinho’) Garante que os logs sejam salvos.
  59. 59. error_log Onde manter o arquivo de log?
  60. 60. ini_set(‘error_log’, ‘/tmp/app.log’) Salva os logs em “/tmp/app.log” (não é uma boa idéia)
  61. 61. ini_set(‘error_log’, ‘syslog’) Envia erros para o syslog (Unix), ou “Event log” (Windows).
  62. 62. ini_set(‘error_log’, ‘’) Padrão: Error log do SAPI (Apache/NGINX) ou STDERR em CLI.
  63. 63. error_reporting Quais severidades devem ser mantidas (php.ini)
  64. 64. Severidades E pra quê servem.
  65. 65. Severidade Exibida (default) Pára execução E_ERROR Sim Sim E_WARNING Sim Não E_NOTICE Não Não E_STRICT Não Não E_DEPRECATED Não Não PHP >=5.3
  66. 66. 1 <?php 2 ini_set('display_errors', 1); 3 error_reporting(E_ALL); 4 5 if ($_POST['user']) { 6 // ... 7 }
  67. 67. 1 <?php 2 ini_set('display_errors', 1); 3 error_reporting(E_ALL); 4 5 if ($_POST['user']) { 6 // ... 7 }
 8 /** 9 * Output: 10 * 11 * PHP Notice: Undefined index: user in notices.php on line 5 12 */
  68. 68. 1 <?php 2 ini_set('display_errors', 1); 3 error_reporting(E_ALL & ~E_NOTICE); 4 5 if ($_POST['user']) { 6 // ... 7 }
 8 /** 9 * Output: 10 * 11 * 12 */
  69. 69. 1 <?php 2 ini_set('display_errors', 1); 3 error_reporting(E_ALL ^E_NOTICE); 4 5 if ($_POST['user']) { 6 // ... 7 }
 8 /** 9 * Output: 10 * 11 * 12 */
  70. 70. 1 <?php 2 ini_set('display_errors', 1); 3 error_reporting(E_ALL); 4 5 echo date('l').PHP_EOL; 6 7 date_default_timezone_set('America/Sao_Paulo'); 8 9 echo date('l').PHP_EOL;
  71. 71. 1 <?php 2 ini_set('display_errors', 1); 3 error_reporting(E_ALL); 4 5 echo date('l').PHP_EOL; 6 7 date_default_timezone_set('America/Sao_Paulo'); 8 9 echo date('l').PHP_EOL; 10 11 /** 12 * Output: 13 * 14 * PHP Warning: date(): It is not safe to rely on the system's 15 * timezone settings. You are *required* to use the date.timezone 16 * setting or the date_default_timezone_set() function. 17 * In case you used any of those methods and you are still getting 18 * this warning, you most likely misspelled the timezone identifier. 19 * We selected the timezone 'UTC' for now, but please set date.timezone 20 * to select your timezone. in date.php on line 5 21 * 22 * Saturday 23 * Saturday 24 */
  72. 72. 1 <?php 2 ini_set('display_errors', 1); 3 error_reporting(E_ALL); 4 5 include 'nao-existe.php';
  73. 73. 1 <?php 2 ini_set('display_errors', 1); 3 error_reporting(E_ALL); 4 5 include 'nao-existe.php'; 6 7 /** 8 * Output: 9 *
 10 * PHP Warning: include(nao-existe.php): failed to open stream: 11 * No such file or directory in warning.php on line 5 12 */
  74. 74. Desenvolvedor Gerando informações para logs.
  75. 75. error_log() Gerando logs
  76. 76. 1 <?php 2 3 ini_set('display_errors', 1); 4 ini_set('error_log', __DIR__.'/example.log'); 5 error_reporting(-1); 6 date_default_timezone_set('America/Sao_Paulo'); 7 8 error_log('Some log message.'); 9 error_log('This goes to /tmp.', 3, '/tmp/app.log');
  77. 77. #!/bin/bash [~/PHP] $ php error_log.php
  78. 78. #!/bin/bash [~/PHP] $ php error_log.php ! [~/PHP] $ ls error_log.php example.log
  79. 79. #!/bin/bash [~/PHP] $ php error_log.php ! [~/PHP] $ ls error_log.php example.log ! [~/PHP] $ tail example.log [10-Jun-2014 00:23:09 America/Sao_Paulo] Some log message
  80. 80. trigger_error() Gera um erro no espaço de usuário
  81. 81. 1 <?php 2 3 ini_set('display_errors', 1); 4 ini_set('error_log', __DIR__.'/example.log'); 5 error_reporting(-1); 6 date_default_timezone_set('America/Sao_Paulo'); 7 8 trigger_error('Start using this!', E_USER_NOTICE);
  82. 82. #!/bin/bash [~/apascutti] $ php trigger_error.php Notice: Start using this! in /Users/apascutti/Desktop/ erros/source/trigger_error.php on line 8 Call Stack: 0.0001 228560 1. {main}() /Users/apascutti/ trigger_error.php:0 0.0002 229328 2. trigger_error() /Users/ apascutti/trigger_error.php:8
  83. 83. Exception Erros orientados a objetos, ou a “capivara” da merda.
  84. 84. 1 <?php 2 3 ini_set('display_errors', 1); 4 ini_set('error_log', __DIR__.'/example.log'); 5 error_reporting(-1); 6 date_default_timezone_set('America/Sao_Paulo'); 7 8 throw new Exception('Shit happens...');
  85. 85. #!/bin/bash [~/Desktop/erros/source] $ php exception.php ! Fatal error: Uncaught exception 'Exception' with message 'Shit happens...' in / Users/apascutti/Desktop/erros/source/exception.php on line 8 ! Exception: Shit happens... in /Users/apascutti/Desktop/erros/source/ exception.php on line 8 ! Call Stack: 0.0002 228584 1. {main}() /Users/apascutti/Desktop/erros/source/ exception.php:0
  86. 86. #!/bin/bash [~/Desktop/erros/source] $ php exception.php ! Fatal error: Uncaught exception 'Exception' with message 'Shit happens...' in / Users/apascutti/Desktop/erros/source/exception.php on line 8 ! Exception: Shit happens... in /Users/apascutti/Desktop/erros/source/ exception.php on line 8 ! Call Stack: 0.0002 228584 1. {main}() /Users/apascutti/Desktop/erros/source/ exception.php:0 ! [~/Desktop/erros/source] $ tail example.log [10-Jun-2014 00:35:19 America/Sao_Paulo] PHP Fatal error: Uncaught exception 'Exception' with message 'Shit happens...' in /Users/apascutti/exception.php:8 Stack trace: #0 {main} thrown in /Users/apascutti/exception.php on line 8
  87. 87. 1 <?php 2 3 ini_set('display_errors', 1); 4 ini_set('error_log', __DIR__.'/example.log'); 5 error_reporting(-1); 6 date_default_timezone_set('America/Sao_Paulo'); 7 8 try { 9 throw new Exception('Shit happens...'); 10 } catch (Exception $e) { 11 throw new Exception('and hit the fan.', 14, $e); 12 }
  88. 88. #!/bin/bash [~/apascutti] $ php exception.php ! Fatal error: Uncaught exception 'Exception' with message 'Shit happens...' in / Users/apascutti/exception.php on line 11 ! Exception: Shit happens... in /Users/apascutti/exception.php on line 9 ! Call Stack: 0.0002 229536 1. {main}() /Users/apascutti/exception.php:0 ! Exception: and hit the fan. in /Users/apascutti/exception.php on line 11 ! Call Stack: 0.0002 229536 1. {main}() /Users/apascutti/exception.php:0
  89. 89. PSR-3 Interface Orientada a Objetos para implementação de Loggers.
  90. 90. 1 <?php 2 3 namespace PsrLog; 4 5 abstract class AbstractLogger implements LoggerInterface 6 { 7 public function emergency($message, array $context=array()) 11 12 public function alert($message, array $context = array()) 16 17 public function critical($message, array $context = array()) 21 22 public function error($message, array $context = array()) 26 27 public function warning($message, array $context = array()) 31 32 public function notice($message, array $context = array()) 36 37 public function info($message, array $context = array()) 41 42 public function debug($message, array $context = array()) 43 { 44 $this->log(LogLevel::DEBUG, $message, $context); 45 } 46 }
  91. 91. 1 <?php 2 3 namespace MyAppIntegrationCommand; 4 5 use MyAppConsole; 6 use PsrLogLoggerInterface; 7 8 class DoShit implements ConsoleCommandInterface 9 { 10 const NAME = 'hankey'; 11 private $logger; 12 13 public function __construct(LoggerInterface $logger) 14 { 15 $this->logger = $logger; 16 } 17 18 public function configure(ConsoleCommandDefinition $builder) 24 25 public function execute(ConsoleInput $in, ConsoleOutput $out) 26 { 27 $logContext = array('command'=>self::NAME); 28 29 $this->logger->debug('Start', $logContext); 30 $this->logger->warning('This is a joke', $logContext); 31 $this->logger->debug('End', $logContext); 32 } 33 }
  92. 92. Uma boa mensagem Ou como tornar as mensagens de log da sua aplicação mais úteis.
  93. 93. • Em inglês. • “grep”ável. • Objetiva, sem pleonamos nem contexto. • Descreve uma expectativa.
  94. 94. Administrador Como isso tudo parece no fim das contas.
  95. 95. 2014/01/10 23:28:24 [/shop/test/TestSuite.php] Warning(E_WARNING): include(PHPUnit/Framework/TestCase.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory on [/home/nihon-store/www/nihon-store/shop/ data/class/SC_ClassAutoloader.php(120)] from 66.249.74.101 2014/01/10 23:28:24 [/shop/test/TestSuite.php] Warning(E_WARNING): include() [<a href='function.include'>function.include</a>]: Failed opening 'PHPUnit/Framework/TestCase.php' for inclusion (include_path='/home/nihon-store/www/nihon-store/shop/data/module:.:/usr/local/ php/5.2.17/lib/php:/opt/local/lib/php') on [/home/nihon-store/www/nihon-store/shop/data/class/SC_ClassAutoloader.php(120)] from 66.249.74.101 2014/01/10 23:28:24 [/shop/test/TestSuite.php] Fatal error(E_ERROR): Class 'PHPUnit_Framework_TestCase' not found on [/home/nihon-store/ www/nihon-store/shop/test/class/page/LC_Page_Test.php(35)] from 66.249.74.101 customer_id = 2014/01/10 23:41:41 [/shop/test/createEcCubeData-v25.php] Warning(E_WARNING): getopt() [<a href='function.getopt'>function.getopt</a>]: No support for long options in this build on [/home/nihon-store/www/nihon-store/shop/test/createEcCubeData-v25.php(119)] from 66.249.74.101 2014/01/10 23:47:58 [/shop/test/createEcCubeData-v25.php] Warning(E_WARNING): getopt() [<a href='function.getopt'>function.getopt</a>]: No support for long options in this build on [/home/nihon-store/www/nihon-store/shop/test/createEcCubeData-v25.php(119)] from 66.249.74.101 2014/01/10 23:54:15 [/shop/test/createEcCubeData-v25.php] Warning(E_WARNING): getopt() [<a href='function.getopt'>function.getopt</a>]: No support for long options in this build on [/home/nihon-store/www/nihon-store/shop/test/createEcCubeData-v25.php(119)] from 66.249.74.101 2014/01/11 04:07:48 [/shop/test/createEcCubeData-v25.php] Warning(E_WARNING): getopt() [<a href='function.getopt'>function.getopt</a>]: No support for long options in this build on [/home/nihon-store/www/nihon-store/shop/test/createEcCubeData-v25.php(119)] from 66.249.74.101 2014/01/11 04:13:57 [/shop/test/createEcCubeData-v25.php] Warning(E_WARNING): getopt() [<a href='function.getopt'>function.getopt</a>]: No support for long options in this build on [/home/nihon-store/www/nihon-store/shop/test/createEcCubeData-v25.php(119)] from 66.249.74.101 2014/01/11 04:20:08 [/shop/test/createEcCubeData-v25.php] Warning(E_WARNING): getopt() [<a href='function.getopt'>function.getopt</a>]: No support for long options in this build on [/home/nihon-store/www/nihon-store/shop/test/createEcCubeData-v25.php(119)] from 66.249.74.101 2014/01/11 05:10:51 [/shop/test/TestSuite.php] Warning(E_WARNING): include(PHPUnit/Framework/TestCase.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory on [/home/nihon-store/www/nihon-store/shop/ data/class/SC_ClassAutoloader.php(120)] from 66.249.74.101
  96. 96. 2014/01/10 23:28:24 [/shop/test/TestSuite.php] Warning(E_WARNING): include(PHPUnit/Framework/TestCase.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory on [/home/nihon-store/www/nihon-store/shop/ data/class/SC_ClassAutoloader.php(120)] from 66.249.74.101 2014/01/10 23:28:24 [/shop/test/TestSuite.php] Warning(E_WARNING): include() [<a href='function.include'>function.include</a>]: Failed opening 'PHPUnit/Framework/TestCase.php' for inclusion (include_path='/home/nihon-store/www/nihon-store/shop/data/module:.:/usr/local/ php/5.2.17/lib/php:/opt/local/lib/php') on [/home/nihon-store/www/nihon-store/shop/data/class/SC_ClassAutoloader.php(120)] from 66.249.74.101 2014/01/10 23:28:24 [/shop/test/TestSuite.php] Fatal error(E_ERROR): Class 'PHPUnit_Framework_TestCase' not found on [/home/nihon-store/ www/nihon-store/shop/test/class/page/LC_Page_Test.php(35)] from 66.249.74.101 customer_id = 2014/01/10 23:41:41 [/shop/test/createEcCubeData-v25.php] Warning(E_WARNING): getopt() [<a href='function.getopt'>function.getopt</a>]: No support for long options in this build on [/home/nihon-store/www/nihon-store/shop/test/createEcCubeData-v25.php(119)] from 66.249.74.101 2014/01/10 23:47:58 [/shop/test/createEcCubeData-v25.php] Warning(E_WARNING): getopt() [<a href='function.getopt'>function.getopt</a>]: No support for long options in this build on [/home/nihon-store/www/nihon-store/shop/test/createEcCubeData-v25.php(119)] from 66.249.74.101 2014/01/10 23:54:15 [/shop/test/createEcCubeData-v25.php] Warning(E_WARNING): getopt() [<a href='function.getopt'>function.getopt</a>]: No support for long options in this build on [/home/nihon-store/www/nihon-store/shop/test/createEcCubeData-v25.php(119)] from 66.249.74.101 2014/01/11 04:07:48 [/shop/test/createEcCubeData-v25.php] Warning(E_WARNING): getopt() [<a href='function.getopt'>function.getopt</a>]: No support for long options in this build on [/home/nihon-store/www/nihon-store/shop/test/createEcCubeData-v25.php(119)] from 66.249.74.101 2014/01/11 04:13:57 [/shop/test/createEcCubeData-v25.php] Warning(E_WARNING): getopt() [<a href='function.getopt'>function.getopt</a>]: No support for long options in this build on [/home/nihon-store/www/nihon-store/shop/test/createEcCubeData-v25.php(119)] from 66.249.74.101 2014/01/11 04:20:08 [/shop/test/createEcCubeData-v25.php] Warning(E_WARNING): getopt() [<a href='function.getopt'>function.getopt</a>]: No support for long options in this build on [/home/nihon-store/www/nihon-store/shop/test/createEcCubeData-v25.php(119)] from 66.249.74.101 2014/01/11 05:10:51 [/shop/test/TestSuite.php] Warning(E_WARNING): include(PHPUnit/Framework/TestCase.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory on [/home/nihon-store/www/nihon-store/shop/ data/class/SC_ClassAutoloader.php(120)] from 66.249.74.101
  97. 97. 2014/01/10 23:28:24 [/shop/test/TestSuite.php] Warning(E_WARNING): include(PHPUnit/Framework/TestCase.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory on [/home/nihon-store/www/nihon-store/shop/ data/class/SC_ClassAutoloader.php(120)] from 66.249.74.101 2014/01/10 23:28:24 [/shop/test/TestSuite.php] Warning(E_WARNING): include() [<a href='function.include'>function.include</a>]: Failed opening 'PHPUnit/Framework/TestCase.php' for inclusion (include_path='/home/nihon-store/www/nihon-store/shop/data/module:.:/usr/local/ php/5.2.17/lib/php:/opt/local/lib/php') on [/home/nihon-store/www/nihon-store/shop/data/class/SC_ClassAutoloader.php(120)] from 66.249.74.101 2014/01/10 23:28:24 [/shop/test/TestSuite.php] Fatal error(E_ERROR): Class 'PHPUnit_Framework_TestCase' not found on [/home/nihon-store/ www/nihon-store/shop/test/class/page/LC_Page_Test.php(35)] from 66.249.74.101 customer_id = 2014/01/10 23:41:41 [/shop/test/createEcCubeData-v25.php] Warning(E_WARNING): getopt() [<a href='function.getopt'>function.getopt</a>]: No support for long options in this build on [/home/nihon-store/www/nihon-store/shop/test/createEcCubeData-v25.php(119)] from 66.249.74.101 2014/01/10 23:47:58 [/shop/test/createEcCubeData-v25.php] Warning(E_WARNING): getopt() [<a href='function.getopt'>function.getopt</a>]: No support for long options in this build on [/home/nihon-store/www/nihon-store/shop/test/createEcCubeData-v25.php(119)] from 66.249.74.101 2014/01/10 23:54:15 [/shop/test/createEcCubeData-v25.php] Warning(E_WARNING): getopt() [<a href='function.getopt'>function.getopt</a>]: No support for long options in this build on [/home/nihon-store/www/nihon-store/shop/test/createEcCubeData-v25.php(119)] from 66.249.74.101 2014/01/11 04:07:48 [/shop/test/createEcCubeData-v25.php] Warning(E_WARNING): getopt() [<a href='function.getopt'>function.getopt</a>]: No support for long options in this build on [/home/nihon-store/www/nihon-store/shop/test/createEcCubeData-v25.php(119)] from 66.249.74.101 2014/01/11 04:13:57 [/shop/test/createEcCubeData-v25.php] Warning(E_WARNING): getopt() [<a href='function.getopt'>function.getopt</a>]: No support for long options in this build on [/home/nihon-store/www/nihon-store/shop/test/createEcCubeData-v25.php(119)] from 66.249.74.101 2014/01/11 04:20:08 [/shop/test/createEcCubeData-v25.php] Warning(E_WARNING): getopt() [<a href='function.getopt'>function.getopt</a>]: No support for long options in this build on [/home/nihon-store/www/nihon-store/shop/test/createEcCubeData-v25.php(119)] from 66.249.74.101 2014/01/11 05:10:51 [/shop/test/TestSuite.php] Warning(E_WARNING): include(PHPUnit/Framework/TestCase.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory on [/home/nihon-store/www/nihon-store/shop/ data/class/SC_ClassAutoloader.php(120)] from 66.249.74.101 Data
  98. 98. 2014/01/10 23:28:24 [/shop/test/TestSuite.php] Warning(E_WARNING): include(PHPUnit/Framework/TestCase.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory on [/home/nihon-store/www/nihon-store/shop/ data/class/SC_ClassAutoloader.php(120)] from 66.249.74.101 2014/01/10 23:28:24 [/shop/test/TestSuite.php] Warning(E_WARNING): include() [<a href='function.include'>function.include</a>]: Failed opening 'PHPUnit/Framework/TestCase.php' for inclusion (include_path='/home/nihon-store/www/nihon-store/shop/data/module:.:/usr/local/ php/5.2.17/lib/php:/opt/local/lib/php') on [/home/nihon-store/www/nihon-store/shop/data/class/SC_ClassAutoloader.php(120)] from 66.249.74.101 2014/01/10 23:28:24 [/shop/test/TestSuite.php] Fatal error(E_ERROR): Class 'PHPUnit_Framework_TestCase' not found on [/home/nihon-store/ www/nihon-store/shop/test/class/page/LC_Page_Test.php(35)] from 66.249.74.101 customer_id = 2014/01/10 23:41:41 [/shop/test/createEcCubeData-v25.php] Warning(E_WARNING): getopt() [<a href='function.getopt'>function.getopt</a>]: No support for long options in this build on [/home/nihon-store/www/nihon-store/shop/test/createEcCubeData-v25.php(119)] from 66.249.74.101 2014/01/10 23:47:58 [/shop/test/createEcCubeData-v25.php] Warning(E_WARNING): getopt() [<a href='function.getopt'>function.getopt</a>]: No support for long options in this build on [/home/nihon-store/www/nihon-store/shop/test/createEcCubeData-v25.php(119)] from 66.249.74.101 2014/01/10 23:54:15 [/shop/test/createEcCubeData-v25.php] Warning(E_WARNING): getopt() [<a href='function.getopt'>function.getopt</a>]: No support for long options in this build on [/home/nihon-store/www/nihon-store/shop/test/createEcCubeData-v25.php(119)] from 66.249.74.101 2014/01/11 04:07:48 [/shop/test/createEcCubeData-v25.php] Warning(E_WARNING): getopt() [<a href='function.getopt'>function.getopt</a>]: No support for long options in this build on [/home/nihon-store/www/nihon-store/shop/test/createEcCubeData-v25.php(119)] from 66.249.74.101 2014/01/11 04:13:57 [/shop/test/createEcCubeData-v25.php] Warning(E_WARNING): getopt() [<a href='function.getopt'>function.getopt</a>]: No support for long options in this build on [/home/nihon-store/www/nihon-store/shop/test/createEcCubeData-v25.php(119)] from 66.249.74.101 2014/01/11 04:20:08 [/shop/test/createEcCubeData-v25.php] Warning(E_WARNING): getopt() [<a href='function.getopt'>function.getopt</a>]: No support for long options in this build on [/home/nihon-store/www/nihon-store/shop/test/createEcCubeData-v25.php(119)] from 66.249.74.101 2014/01/11 05:10:51 [/shop/test/TestSuite.php] Warning(E_WARNING): include(PHPUnit/Framework/TestCase.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory on [/home/nihon-store/www/nihon-store/shop/ data/class/SC_ClassAutoloader.php(120)] from 66.249.74.101 Arquivo
  99. 99. 2014/01/10 23:28:24 [/shop/test/TestSuite.php] Warning(E_WARNING): include(PHPUnit/Framework/TestCase.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory on [/home/nihon-store/www/nihon-store/shop/ data/class/SC_ClassAutoloader.php(120)] from 66.249.74.101 2014/01/10 23:28:24 [/shop/test/TestSuite.php] Warning(E_WARNING): include() [<a href='function.include'>function.include</a>]: Failed opening 'PHPUnit/Framework/TestCase.php' for inclusion (include_path='/home/nihon-store/www/nihon-store/shop/data/module:.:/usr/local/ php/5.2.17/lib/php:/opt/local/lib/php') on [/home/nihon-store/www/nihon-store/shop/data/class/SC_ClassAutoloader.php(120)] from 66.249.74.101 2014/01/10 23:28:24 [/shop/test/TestSuite.php] Fatal error(E_ERROR): Class 'PHPUnit_Framework_TestCase' not found on [/home/nihon-store/ www/nihon-store/shop/test/class/page/LC_Page_Test.php(35)] from 66.249.74.101 customer_id = 2014/01/10 23:41:41 [/shop/test/createEcCubeData-v25.php] Warning(E_WARNING): getopt() [<a href='function.getopt'>function.getopt</a>]: No support for long options in this build on [/home/nihon-store/www/nihon-store/shop/test/createEcCubeData-v25.php(119)] from 66.249.74.101 2014/01/10 23:47:58 [/shop/test/createEcCubeData-v25.php] Warning(E_WARNING): getopt() [<a href='function.getopt'>function.getopt</a>]: No support for long options in this build on [/home/nihon-store/www/nihon-store/shop/test/createEcCubeData-v25.php(119)] from 66.249.74.101 2014/01/10 23:54:15 [/shop/test/createEcCubeData-v25.php] Warning(E_WARNING): getopt() [<a href='function.getopt'>function.getopt</a>]: No support for long options in this build on [/home/nihon-store/www/nihon-store/shop/test/createEcCubeData-v25.php(119)] from 66.249.74.101 2014/01/11 04:07:48 [/shop/test/createEcCubeData-v25.php] Warning(E_WARNING): getopt() [<a href='function.getopt'>function.getopt</a>]: No support for long options in this build on [/home/nihon-store/www/nihon-store/shop/test/createEcCubeData-v25.php(119)] from 66.249.74.101 2014/01/11 04:13:57 [/shop/test/createEcCubeData-v25.php] Warning(E_WARNING): getopt() [<a href='function.getopt'>function.getopt</a>]: No support for long options in this build on [/home/nihon-store/www/nihon-store/shop/test/createEcCubeData-v25.php(119)] from 66.249.74.101 2014/01/11 04:20:08 [/shop/test/createEcCubeData-v25.php] Warning(E_WARNING): getopt() [<a href='function.getopt'>function.getopt</a>]: No support for long options in this build on [/home/nihon-store/www/nihon-store/shop/test/createEcCubeData-v25.php(119)] from 66.249.74.101 2014/01/11 05:10:51 [/shop/test/TestSuite.php] Warning(E_WARNING): include(PHPUnit/Framework/TestCase.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory on [/home/nihon-store/www/nihon-store/shop/ data/class/SC_ClassAutoloader.php(120)] from 66.249.74.101 Severidade
  100. 100. 2014/01/10 23:28:24 [/shop/test/TestSuite.php] Warning(E_WARNING): include(PHPUnit/Framework/TestCase.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory on [/home/nihon-store/www/nihon-store/shop/ data/class/SC_ClassAutoloader.php(120)] from 66.249.74.101 2014/01/10 23:28:24 [/shop/test/TestSuite.php] Warning(E_WARNING): include() [<a href='function.include'>function.include</a>]: Failed opening 'PHPUnit/Framework/TestCase.php' for inclusion (include_path='/home/nihon-store/www/nihon-store/shop/data/module:.:/usr/local/ php/5.2.17/lib/php:/opt/local/lib/php') on [/home/nihon-store/www/nihon-store/shop/data/class/SC_ClassAutoloader.php(120)] from 66.249.74.101 2014/01/10 23:28:24 [/shop/test/TestSuite.php] Fatal error(E_ERROR): Class 'PHPUnit_Framework_TestCase' not found on [/home/nihon-store/ www/nihon-store/shop/test/class/page/LC_Page_Test.php(35)] from 66.249.74.101 customer_id = 2014/01/10 23:41:41 [/shop/test/createEcCubeData-v25.php] Warning(E_WARNING): getopt() [<a href='function.getopt'>function.getopt</a>]: No support for long options in this build on [/home/nihon-store/www/nihon-store/shop/test/createEcCubeData-v25.php(119)] from 66.249.74.101 2014/01/10 23:47:58 [/shop/test/createEcCubeData-v25.php] Warning(E_WARNING): getopt() [<a href='function.getopt'>function.getopt</a>]: No support for long options in this build on [/home/nihon-store/www/nihon-store/shop/test/createEcCubeData-v25.php(119)] from 66.249.74.101 2014/01/10 23:54:15 [/shop/test/createEcCubeData-v25.php] Warning(E_WARNING): getopt() [<a href='function.getopt'>function.getopt</a>]: No support for long options in this build on [/home/nihon-store/www/nihon-store/shop/test/createEcCubeData-v25.php(119)] from 66.249.74.101 2014/01/11 04:07:48 [/shop/test/createEcCubeData-v25.php] Warning(E_WARNING): getopt() [<a href='function.getopt'>function.getopt</a>]: No support for long options in this build on [/home/nihon-store/www/nihon-store/shop/test/createEcCubeData-v25.php(119)] from 66.249.74.101 2014/01/11 04:13:57 [/shop/test/createEcCubeData-v25.php] Warning(E_WARNING): getopt() [<a href='function.getopt'>function.getopt</a>]: No support for long options in this build on [/home/nihon-store/www/nihon-store/shop/test/createEcCubeData-v25.php(119)] from 66.249.74.101 2014/01/11 04:20:08 [/shop/test/createEcCubeData-v25.php] Warning(E_WARNING): getopt() [<a href='function.getopt'>function.getopt</a>]: No support for long options in this build on [/home/nihon-store/www/nihon-store/shop/test/createEcCubeData-v25.php(119)] from 66.249.74.101 2014/01/11 05:10:51 [/shop/test/TestSuite.php] Warning(E_WARNING): include(PHPUnit/Framework/TestCase.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory on [/home/nihon-store/www/nihon-store/shop/ data/class/SC_ClassAutoloader.php(120)] from 66.249.74.101 Mensagem
  101. 101. Dúvidas? Ou sugestões, reclamações? Críticas? Elogios? Cerveja?!

×