从谷歌应用程序引擎下载详细日志 [英] Downloading detailed logs from google app engine
问题描述
我试过以下命令:
appcfg.py request_logs --num_days = 2。 〜/ Documents / workspace / loganalyzer / applog_29march.log
给我47943条记录。
但记录确实只有http clf格式的标题。 {在这里我需要获取每条记录的详细日志,但我只能得到标题}
但是,如果我使用
appcfg.py --severity = 0 --num_days = 2 request_logs。 〜/ Documents / workspace / loganalyzer / applog_27March.log
appcfg.py --severity = 1 --num_days = 2 --append request_logs。 〜/ Documents / workspace / loganalyzer / applog_27March.log
appcfg.py --severity = 2 --num_days = 2 --append request_logs。 〜/ Documents / workspace / loganalyzer / applog_27March.log
appcfg.py --severity = 3 --num_days = 2 --append request_logs。 〜/ Documents / workspace / loganalyzer / applog_27March.log
appcfg.py --severity = 4 --num_days = 2 --append request_logs。 〜/ Documents / workspace / loganalyzer / applog_27March.log
错误也。
在我看来,他们应该匹配47943条记录。
App Engine为不同级别的日志使用循环缓冲区 - 每个严重级别一个。当空间用尽时,它将覆盖最早的日志条目。因此,您的错误日志将比您的警告日志回溯得更远,这将比信息日志更进一步,等等 - 而普通的HTTP请求日志将保持最长。
I want to download the raw access logs from google app engine app written in python.
I have tried following commands:
appcfg.py request_logs --num_days=2 . ~/Documents/workspace/loganalyzer/applog_29march.log
Gives me 47943 records.
But the records does have only header in http clf format. {Here i need to get the detailed log for each record, but i get only headers}
But if i use
appcfg.py --severity=0 --num_days=2 request_logs . ~/Documents/workspace/loganalyzer/applog_27March.log
appcfg.py --severity=1 --num_days=2 --append request_logs . ~/Documents/workspace/loganalyzer/applog_27March.log
appcfg.py --severity=2 --num_days=2 --append request_logs . ~/Documents/workspace/loganalyzer/applog_27March.log
appcfg.py --severity=3 --num_days=2 --append request_logs . ~/Documents/workspace/loganalyzer/applog_27March.log
appcfg.py --severity=4 --num_days=2 --append request_logs . ~/Documents/workspace/loganalyzer/applog_27March.log
I get a total of only 2000 records with detailed errors also.
In my opinion they should match to 47943 records.
App Engine uses circular buffers for the different levels of logs - one for each severity level. When it runs out of space, it overwrites the oldest log entries. As a result, your error logs will go back further than your warning logs, which will go further than info logs, and so forth - and ordinary HTTP request logs will be kept the longest.
这篇关于从谷歌应用程序引擎下载详细日志的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!