Logs
@augustohp
Logs
@augustohp
O que comem, onde vivem e como se reproduzem.
–RFC 3164: The BSD syslog protocol
“Since the beginning, life has relied upon the
transmission of messages.”
Agenda
• O que não são
• O que comem
• Onde vivem
• Como se reproduzem
O que não são
–Hagrid
“… são seres muito incompreendidos.”
• Enfeite
• “Ferramentas” para liberar espaço em disco
• Para apreciação pública
O que comem
O que comem
Uma dieta configuravel com ênfase em
compatibilidade
Texto
Inglês: ASCII < ISO < UTF
Arquivos simples
1 registro por linha
Registro sempre formatado
Exemplo (Apache access.log)
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/)"!
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 …
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”.
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…
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…
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).
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).
Como estudar/usar
wc
word, line, character and byte count
#!/bin/bash	

[~/Apache] $ wc -l access.log	
65063 access.log
head
display first lines of a file
#!/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"
tail
display the last lines of a file
#!/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"
#!/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"
grep
print lines matching a pattern
#!/bin/bash	

[~/Apache] $ grep "HTTP/1.1" access.log | wc -l	
52129	
!
#!/bin/bash	

[~/Apache] $ grep "HTTP/1.1" access.log | wc -l	
52129	
!
[~/Apache] $ grep "HTTP/1.0" access.log | wc -l	
13007	
!
#!/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"	
!
#!/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"	
!
awk
pattern-directed scanning and processing language
#!/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"	
!
#!/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
#!/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
#!/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"
uniq / sort
#!/bin/bash	

[~/Apache] $ awk '/access.log/' access.log | 	
awk '{print $1}' | 	
sort | 	
uniq -c | 	
sort -r
#!/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
Onde vivem
/var/log
Seu administrador de sistemas agradece.
Seres famosos (Debian)
• /var/log/apache2/access.log
• /var/log/apache2/error.log
• /var/log/messages
• /var/log/mysql.err
Como se reproduzem
PHP
E seus métodos anticoncepcionais
display_errors
Os erros devem ser exibidos para o usuário?
ini_set(‘display_errors’, ‘On’)
Exibe os erros ao usuário.
O PHP respeita o cabeçalho HTTP “Content-Type”.
ini_set(‘display_errors’, 1)
Também é interpretado como “On”.
ini_set(‘display_errors’, true)
Também é interpretado como “On”.
$isDev = true;
ini_set(‘display_errors’, $isDev)
Também é interpretado como “On”.
$isDev =“1 caralhinho”;
ini_set(‘display_errors’, $isDev)
Isso também é “On”.
$isDev =“2 caralhinhos”;
ini_set(‘display_errors’, $isDev)
Isso é “Off”.
log_errors
Os erros devem ser mantidos?
log_errors
Os erros devem ser mantidos?
Siiiiiiiiiiiim!
ini_set(‘log_errors’, ‘1 caralhinho’)
Garante que os logs sejam salvos.
error_log
Onde manter o arquivo de log?
ini_set(‘error_log’, ‘/tmp/app.log’)
Salva os logs em “/tmp/app.log” (não é uma boa idéia)
ini_set(‘error_log’, ‘syslog’)
Envia erros para o syslog (Unix), ou “Event
log” (Windows).
ini_set(‘error_log’, ‘’)
Padrão: Error log do SAPI (Apache/NGINX) ou STDERR
em CLI.
error_reporting
Quais severidades devem ser mantidas (php.ini)
Severidades
E pra quê servem.
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
1 <?php	
2 ini_set('display_errors', 1);	
3 error_reporting(E_ALL);	
4	
5 if ($_POST['user']) {	
6 // ...	
7 }
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 */
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 */
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 */
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;
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 */
1 <?php	
2 ini_set('display_errors', 1);	
3 error_reporting(E_ALL);	
4	
5 include 'nao-existe.php';
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 */
Desenvolvedor
Gerando informações para logs.
error_log()
Gerando logs
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');
#!/bin/bash	
[~/PHP] $ php error_log.php
#!/bin/bash	
[~/PHP] $ php error_log.php	
!
[~/PHP] $ ls	
error_log.php example.log
#!/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
trigger_error()
Gera um erro no espaço de usuário
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);
#!/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
Exception
Erros orientados a objetos, ou a “capivara” da merda.
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...');
#!/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
#!/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
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 }
#!/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
PSR-3
Interface Orientada a Objetos para implementação de
Loggers.
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 }
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 }
Uma boa mensagem
Ou como tornar as mensagens de log da sua aplicação
mais úteis.
• Em inglês.
• “grep”ável.
• Objetiva, sem pleonamos nem contexto.
• Descreve uma expectativa.
Administrador
Como isso tudo parece no fim das contas.
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
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
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
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
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
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
Dúvidas?
Ou sugestões, reclamações? Críticas? Elogios?
Cerveja?!

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

  • 1.
  • 2.
    Logs @augustohp O que comem,onde vivem e como se reproduzem.
  • 3.
    –RFC 3164: TheBSD syslog protocol “Since the beginning, life has relied upon the transmission of messages.”
  • 4.
    Agenda • O quenão são • O que comem • Onde vivem • Como se reproduzem
  • 5.
  • 6.
    –Hagrid “… são seresmuito incompreendidos.”
  • 7.
    • Enfeite • “Ferramentas”para liberar espaço em disco • Para apreciação pública
  • 8.
  • 9.
    O que comem Umadieta configuravel com ênfase em compatibilidade
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 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/)"!
  • 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 …
  • 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/)"! 1 registro por linha … … ou “quebra de linha”.
  • 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/)"! Separadas por espaço…
  • 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…
  • 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/)"! … ou entre “ ” (aspas) … Separadas por espaço… … ou [ ] (colchetes).
  • 23.
    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).
  • 24.
  • 25.
  • 26.
    #!/bin/bash [~/Apache] $ wc-l access.log 65063 access.log
  • 27.
  • 28.
    #!/bin/bash [~/Apache]$ head -n1 access.log 1.202.218.8 - - [20/Jun/2012:19:05:12 +0200] "GET / robots.txt HTTP/1.0" 404 492 "-" ""Mozilla/5.0"
  • 29.
    tail display the lastlines of a file
  • 30.
    #!/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"
  • 31.
    #!/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"
  • 32.
  • 33.
    #!/bin/bash [~/Apache] $ grep"HTTP/1.1" access.log | wc -l 52129 !
  • 34.
    #!/bin/bash [~/Apache] $ grep"HTTP/1.1" access.log | wc -l 52129 ! [~/Apache] $ grep "HTTP/1.0" access.log | wc -l 13007 !
  • 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.
    #!/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" !
  • 38.
  • 39.
    #!/bin/bash [~/Apache]$ head -n1 access.log 1.202.218.8 - - [20/Jun/2012:19:05:12 +0200] "GET / robots.txt HTTP/1.0" 404 492 "-" “"Mozilla/5.0" !
  • 40.
    #!/bin/bash [~/Apache]$ head -n1 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
  • 41.
    #!/bin/bash [~/Apache]$ head -n1 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
  • 42.
    #!/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"
  • 43.
  • 44.
    #!/bin/bash [~/Apache] $ awk'/access.log/' access.log | awk '{print $1}' | sort | uniq -c | sort -r
  • 45.
    #!/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
  • 46.
  • 47.
  • 48.
    Seres famosos (Debian) •/var/log/apache2/access.log • /var/log/apache2/error.log • /var/log/messages • /var/log/mysql.err
  • 49.
  • 50.
    PHP E seus métodosanticoncepcionais
  • 51.
    display_errors Os erros devemser exibidos para o usuário?
  • 52.
    ini_set(‘display_errors’, ‘On’) Exibe oserros ao usuário. O PHP respeita o cabeçalho HTTP “Content-Type”.
  • 53.
  • 54.
  • 55.
    $isDev = true; ini_set(‘display_errors’,$isDev) Também é interpretado como “On”.
  • 56.
  • 57.
  • 58.
  • 59.
    log_errors Os erros devemser mantidos? Siiiiiiiiiiiim!
  • 60.
  • 61.
    error_log Onde manter oarquivo de log?
  • 62.
    ini_set(‘error_log’, ‘/tmp/app.log’) Salva oslogs em “/tmp/app.log” (não é uma boa idéia)
  • 63.
    ini_set(‘error_log’, ‘syslog’) Envia errospara o syslog (Unix), ou “Event log” (Windows).
  • 64.
    ini_set(‘error_log’, ‘’) Padrão: Errorlog do SAPI (Apache/NGINX) ou STDERR em CLI.
  • 65.
  • 66.
  • 67.
    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
  • 68.
    1 <?php 2 ini_set('display_errors',1); 3 error_reporting(E_ALL); 4 5 if ($_POST['user']) { 6 // ... 7 }
  • 69.
    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 */
  • 70.
    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 */
  • 71.
    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 */
  • 72.
    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;
  • 73.
    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 */
  • 74.
    1 <?php 2 ini_set('display_errors',1); 3 error_reporting(E_ALL); 4 5 include 'nao-existe.php';
  • 75.
    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 */
  • 76.
  • 77.
  • 78.
    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');
  • 79.
  • 80.
    #!/bin/bash [~/PHP] $ phperror_log.php ! [~/PHP] $ ls error_log.php example.log
  • 81.
    #!/bin/bash [~/PHP] $ phperror_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
  • 82.
    trigger_error() Gera um errono espaço de usuário
  • 83.
    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);
  • 84.
    #!/bin/bash [~/apascutti] $ phptrigger_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
  • 85.
    Exception Erros orientados aobjetos, ou a “capivara” da merda.
  • 86.
    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...');
  • 87.
    #!/bin/bash [~/Desktop/erros/source] $ phpexception.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
  • 88.
    #!/bin/bash [~/Desktop/erros/source] $ phpexception.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
  • 89.
    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 }
  • 90.
    #!/bin/bash [~/apascutti] $ phpexception.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
  • 91.
    PSR-3 Interface Orientada aObjetos para implementação de Loggers.
  • 92.
    1 <?php 2 3 namespacePsrLog; 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 }
  • 93.
    1 <?php 2 3 namespaceMyAppIntegrationCommand; 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 }
  • 94.
    Uma boa mensagem Oucomo tornar as mensagens de log da sua aplicação mais úteis.
  • 95.
    • Em inglês. •“grep”ável. • Objetiva, sem pleonamos nem contexto. • Descreve uma expectativa.
  • 96.
    Administrador Como isso tudoparece no fim das contas.
  • 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
  • 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
  • 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 Data
  • 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 Arquivo
  • 101.
    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
  • 102.
    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
  • 103.
    Dúvidas? Ou sugestões, reclamações?Críticas? Elogios? Cerveja?!