원시 액세스 로그를 appcfg.py와 함께 다운로드 할 수 있다는 것을 알고 있지만 파이썬 로깅 문, 예외 및 API 통계와 같은 특정 요청과 관련된 모든 정보에 관심이 있습니다. 온라인 로그 뷰어). 그 정보를 다른 방법으로 얻는 방법이 있다면 누구나 알 수 있습니까?AppEngine에서 로그 다운로드 Python 로그 문 포함
궁금한 점이 있다면 문제에 대한 통계 분석을하고 벽면의 대형 스크린에 표시하는 것입니다.
원시 액세스 로그를 appcfg.py와 함께 다운로드 할 수 있다는 것을 알고 있지만 파이썬 로깅 문, 예외 및 API 통계와 같은 특정 요청과 관련된 모든 정보에 관심이 있습니다. 온라인 로그 뷰어). 그 정보를 다른 방법으로 얻는 방법이 있다면 누구나 알 수 있습니까?AppEngine에서 로그 다운로드 Python 로그 문 포함
궁금한 점이 있다면 문제에 대한 통계 분석을하고 벽면의 대형 스크린에 표시하는 것입니다.
물론 - 단지 appcfg.py하는 --severity 플래그를 전달합니다
$ appcfg.py help request_logs
Usage: appcfg.py [options] request_logs <directory> <output_file>
Write request logs in Apache common log format.
The 'request_logs' command exports the request logs from your application
to a file. It will write Apache common log format records ordered
chronologically. If output file is '-' stdout will be written.
Options:
-h, --help Show the help message and exit.
-q, --quiet Print errors only.
-v, --verbose Print info level logs.
--noisy Print all logs.
-s SERVER, --server=SERVER
The server to connect to.
--insecure Use HTTP when communicating with the server.
-e EMAIL, --email=EMAIL
The username to use. Will prompt if omitted.
-H HOST, --host=HOST Overrides the Host header sent with all RPCs.
--no_cookies Do not save authentication cookies to local disk.
--passin Read the login password from stdin.
-A APP_ID, --application=APP_ID
Override application from app.yaml file.
-V VERSION, --version=VERSION
Override (major) version from app.yaml file.
-n NUM_DAYS, --num_days=NUM_DAYS
Number of days worth of log data to get. The cut-off
point is midnight UTC. Use 0 to get all available
logs. Default is 1, unless --append is also given;
then the default is 0.
-a, --append Append to existing file.
--severity=SEVERITY Severity of app-level log messages to get. The range
is 0 (DEBUG) through 4 (CRITICAL). If omitted, only
request logs are returned.
--vhost=VHOST The virtual host of log messages to get. If omitted,
all log messages are returned.
--include_vhost Include virtual host in log messages.
--end_date=END_DATE End date (as YYYY-MM-DD) of period for log data.
Defaults to today.
이 정말 잘 우리를 위해 작동하는 것입니다 : 어쨌든
appcfg.py --append --num_days=0 --include_all request_logs /path/to/your/app/ /var/log/gae/yourapp.log
라인 위 얻을 것이다 귀하의 모든 로그 레코드를 작성한 후 로그 파일에 추가하십시오. 그렇지 않은 경우, 새 로그 파일을 작성합니다. 실제로는 기존 로그를보고 (있을 경우) 중복을 얻지 않습니다. 원하는 경우 --append
없이 실행할 수 있지만 로그 다운로드를 자동화하는 경우 사용하십시오.
여기 키는 문서화되지 않은 것으로 보이는 --include_all
플래그입니다. 이 플래그는 GAE의 웹 로그 뷰어를 사용하는 경우 표시되는 모든 데이터를 가져옵니다. 따라서 다음과 같은 필드를 얻을 수 있습니다. ms = 71 cpu_ms = 32 api_cpu_ms = 12 cpm_usd = 0.000921 ...
좋아, 나는 누군가를 돕기를 바랍니다.
BTW, 우리는이에 블로그 게시물을 썼다 여기에 체크 아웃 : http://bit.ly/GAE-LOGS
나는 appcfg와 100M 한계로 실행 것으로 보인다. 당신이 처리를 촉진 할 수 있도록 사용자 정의 (또한 나를 request_logs에 대한 분석의 모든 데이터를 다운로드되지 않고 원시 로그에 액세스 할 수있는 방법을 여기에 https://github.com/manasg/gae-log-fetcher
있다 - 나는 로그 여기
를 얻기 위해 코드를 logservice API를 있어요 사용하여 종료 지정된 시간 프레임 동안). 애플리케이션 제목 및 logs.py 복사 쉽게 업데이트 앱에이 기능을 추가 할 수 있습니다 https://gaelogapp.appspot.com/
을 어떻게 할 수 여기에
은에서 appengine 자체에서 실행되는 응용 프로그램입니다 그것을 놓쳤습니다 :-( –