官术网_书友最值得收藏!

Tailing logs

Zappa provides a facility for watching the logs related to your deployment. You can simply use the following command:

$ zappa tail production

This will print all logs related to HTTP requests and AWS events. If you want to print logs related to HTTP requests, you can simply pass the --http argument:

$ zappa tail production --http

You can reverse the preceding command with non-HTTP events and log messages by simply using the following code::

$ zappa tail production --non-http

You can also limit the log with respect to time using the --since argument:

$ zappa tail production --since 1h # 1 hour
$ zappa tail production --since 1m # 1 minute
$ zappa tail production --since 1mm # 1 month

You can also filter the logs with the --filter argument, for example:

$ zappa tail production --since 1h --http --filter “POST”

This will show only HTTP POST requests for the last hour. This uses the AWS CloudWatch log-filter pattern (http://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/FilterAndPatternSyntax.html).

主站蜘蛛池模板: 葫芦岛市| 德州市| 东安县| 桐城市| 阿拉善右旗| 米林县| 外汇| 房产| 丹凤县| 从江县| 湛江市| 龙岩市| 泰兴市| 金湖县| 卢龙县| 临汾市| 土默特右旗| 河津市| 高平市| 拜泉县| 高碑店市| 冷水江市| 嫩江县| 哈巴河县| 英德市| 阳新县| 崇仁县| 巴中市| 齐齐哈尔市| 日喀则市| 武义县| 阿坝县| 苗栗县| 漳浦县| 德昌县| 团风县| 旬邑县| 湾仔区| 和田市| 丰原市| 和静县|