Skip to content

Commit

Permalink
update breaking logs usage, add a new tutorial about pull logs
Browse files Browse the repository at this point in the history
  • Loading branch information
wjo1212 committed Jan 25, 2018
1 parent e98dd14 commit ebe0877
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 14 deletions.
13 changes: 8 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
* [Logs write and consume](#9-logs-write-and-consume)
* [Shipper management](#10-shipper-management)
* [Consumer group management](#11-consumer-group-management)
* [Best Practice](#best-practice)
* [Troubleshooting](#troubleshooting)
* [Other resources](#other-resources)

Expand Down Expand Up @@ -268,12 +269,9 @@ which outputs:
You could use below `--jmes-filter` to break log into each line:

```shell
> aliyun log get_logs ... --jmes-filter="join('
', map(&to_string(@), @))"
> aliyun log get_logs ... --jmes-filter="join('\n', map(&to_string(@), @))"
```

**Note** there's a string containing a newline passed to `jmes-filter`.

output:

```shell
Expand Down Expand Up @@ -632,7 +630,7 @@ All the commands support below optional global options:
- get_shipper_tasks
- retry_shipper_tasks

<h3 id="#11-consumer-group-management">11. Consumer group management</h3>
<h3 id="11-consumer-group-management">11. Consumer group management</h3>

- create_consumer_group
- update_consumer_group
Expand All @@ -641,6 +639,11 @@ All the commands support below optional global options:
- update_check_point
- get_check_point

### Best Practice

- [Create Logtail Config](http://aliyun-log-cli.readthedocs.io/en/latest/tutorials/tutorial_create_logtail_config.html)
- [Duplicate project settings cross region](http://aliyun-log-cli.readthedocs.io/en/latest/tutorials/tutorial_manage_cross_region_copy.html)
- [Pull Logs](http://aliyun-log-cli.readthedocs.io/en/latest/tutorials/tutorial_pull_logs.html)


### Troubleshooting
Expand Down
13 changes: 9 additions & 4 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
* [日志读写与消费](#9-日志读写与消费)
* [投递管理](#10-投递管理)
* [消费组管理](#11-消费组管理)
* [最佳实践](#最佳实践)
* [错误诊断](#错误诊断)
* [其他资源](#其他资源)

Expand Down Expand Up @@ -268,12 +269,9 @@ region-endpoint=cn-hangzhou.log.aliyuncs.com
通过以下命令将日志分隔为每一行:

```shell
> aliyun log get_logs ... --jmes-filter="join('
', map(&to_string(@), @))"
> aliyun log get_logs ... --jmes-filter="join('\n', map(&to_string(@), @))"
```

**注意** 这里传入了一个包含换行符的字符串给`jmes-filter`.

输出:

```shell
Expand Down Expand Up @@ -641,6 +639,13 @@ def create_logstore(self, project_name, logstore_name, ttl=2, shard_count=30):
- get_check_point


<h1 id="最佳实践">最佳实践</h1>

- [创建Logtail配置](http://aliyun-log-cli.readthedocs.io/en/latest/tutorials/tutorial_create_logtail_config.html)
- [跨域复制项目配置](http://aliyun-log-cli.readthedocs.io/en/latest/tutorials/tutorial_manage_cross_region_copy.html)
- [拉取日志](http://aliyun-log-cli.readthedocs.io/en/latest/tutorials/tutorial_pull_logs.html)


<h1 id="错误诊断">错误诊断</h1>

CLI默认把执行过程中的警告和错误存储在`~/aliyunlogcli.log`中, 也可以配置~/.aliyunlogcli中`__loggging__`来调整错误存储位置和格式:
Expand Down
2 changes: 1 addition & 1 deletion doc/source/tutorials/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

tutorial_create_logtail_config.rst
tutorial_manage_cross_region_copy.rst
tutorial_log_download.rst
tutorial_pull_logs.rst
tutorial_log_upload.rst
tutorial_log_monitor.rst
jmes_filter_usage.rst
Expand Down
4 changes: 0 additions & 4 deletions doc/source/tutorials/tutorial_log_download.rst

This file was deleted.

0 comments on commit ebe0877

Please sign in to comment.