Skip to content

Commit

Permalink
去掉空白页面
Browse files Browse the repository at this point in the history
  • Loading branch information
yunnysunny committed Feb 8, 2025
1 parent f44918c commit 02fe013
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 9 deletions.
8 changes: 6 additions & 2 deletions text/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,22 @@ module.exports = {
extendMarkdown: md => {
md.use(require('markdown-it-disable-url-encode'));
},
headers: {
// 用到哪一级就提取哪一级
level: [2, 3, 4, 5, 6],
},
},
 themeConfig: {
sidebar: [
{
title: '基础教程', // 必要的
// path: '/', // 可选的, 标题的跳转链接,应为绝对路径且必须存在
collapsable: false, // 可选的, 默认值是 true,
sidebarDepth: 3, // 可选的, 默认值是 1
sidebarDepth: 4, // 可选的, 默认值是 1
children: toc
}
],
sidebarDepth: 3,
sidebarDepth: 4,
   logo: '/images/logo.png',
nav: [
    { text: '首页', link: '/' },
Expand Down
5 changes: 4 additions & 1 deletion text/.vuepress/toc.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ const fs = require('fs')
const path = require('path')
const toc = []
const mks = fs.readdirSync(path.join(__dirname, '../')).forEach((file) => {
if (file === 'README.md' || file === 'SUMMARY.md') {
if (file === 'README.md'
|| file === 'SUMMARY.md'
|| file === '15_micro_service.md'
|| file === '16_openapi_doc.md') {
return
}
if (file.endsWith('.md')) {
Expand Down
12 changes: 6 additions & 6 deletions text/14_node_log_and_monitor.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ ksqldb 的端口号,改写成了 8090,因为很多人电脑上 8080 端口

在上图的文本框中输入以下语句

```ksqldb
```sql
CREATE STREAM req_log (
req_id STRING,
domain STRING,
Expand Down Expand Up @@ -376,23 +376,23 @@ Index pattern 选项中我们使用 * 通配符进行索引,是由于我们的

如果想检索数据可以在⑦号位中输入 [KQL](https://www.elastic.co/guide/en/kibana/current/kuery-query.html) 表达式,举几个例子,我们前面收集的日志中有 method 这个字段,那么我们搜 method 为 GET 的日志,可以用以下表达式,输入⑦号位后回车即可展现查询结果:

```kql
```sql
method: GET
```

**表达式 14.1.2.1.1**

如果想查 method 为 GET,并且 router 为 /a 的日志,可以用 AND 关键字连接两个查询表达式:

```kql
```sql
method: GET AND router: /a
```

**表达式 14.1.2.1.2**

如果想查 user_agent 字段中包含 Windows NT 10.0; Win64; x64 字符串的日志,你需要使用下面的表达式:

```kql
```sql
user_agent: "Windows NT 10.0; Win64; x64"
```

Expand All @@ -402,7 +402,7 @@ user_agent: "Windows NT 10.0; Win64; x64"

还有一点需要注意,如果你查询的字符串中包含如下字符 `\():<>"*` ,那么你需要使用 \ 字符进行转义,或者使用引号将查询字符串包裹起来。比如说我们查询 referer 字段为 http://localhost 的时候,可以写成以下两种方式:

```kql
```sql
referer: http\://localhost
referer: "http://localhost"
```
Expand All @@ -411,7 +411,7 @@ referer: "http://localhost"

如果我们查询的逻辑比较负责,可以使用小括号来更改逻辑判断的优先级,比如说我们想查询 method 为 GET ,且 router 为 /a 或者 /b 的日志,可以写成如下表达式:

```kql
```sql
method: GET AND (router: /a OR router: /b)
```

Expand Down
Empty file removed text/images 1.md
Empty file.
Empty file removed text/images 2.md
Empty file.
Empty file removed text/images.md
Empty file.

0 comments on commit 02fe013

Please sign in to comment.