Skip to content

Commit de5014e

Browse files
committed
feat(taosgen): add command-line parameters for log output
1 parent b2cdd58 commit de5014e

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

docs/en/14-reference/02-tools/11-taosgen.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,8 @@ taosgen -h 127.0.0.1 -c config.yaml
5757
| -u/--user | Username for connecting to the server, default is root |
5858
| -p/--password | Password for connecting to the server, default is taosdata |
5959
| -c/--config-file | Path to the YAML configuration file |
60+
| -d/--log-dir | Specify log output directory, default is ./log |
61+
| -f/--log-file | Specify complete log file path (overrides --log-dir) |
6062
| -?/--help | Show help information and exit |
6163
| -V/--version | Show version information and exit. Cannot be used with other parameters |
6264

@@ -168,7 +170,7 @@ By combining multiple steps, jobs can implement complex logic flows, such as TDe
168170
- timestamp_offset: Timestamp offset configuration.
169171
- offset_type (string): Offset type, options: "relative", "absolute".
170172
- value (string/int): Offset value (relative) or starting timestamp (absolute):
171-
- For "relative": string format `±[value][unit]` (e.g., "+1d3h" means add 1 day 3 hours), units: y (year), m (month), d (day), s (second).
173+
- For "relative": string format `±[value][unit]` (e.g., "+1d3h30m" means add 1 day 3 hours 30 minutes), units: y (year), M (month, uppercase), d (day), h (hour), m (minute, lowercase), s (second).
172174
- For "absolute": int or string, either timestamp value (precision as per timestamp_precision) or ISO 8601 string ("YYYY-MM-DD HH:mm:ss").
173175
- tbname: Table name generation configuration:
174176
- prefix (string): Table name prefix, default: "d".

docs/zh/14-reference/02-tools/11-taosgen.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ taosgen -h 127.0.0.1 -c config.yaml
5656
| -u/--user | 指定用于连接服务器的用户名,默认为 root |
5757
| -p/--password | 指定用于连接服务器的密码,默认值为 taosdata |
5858
| -c/--config-file | 指定 yaml 格式配置文件的路径 |
59+
| -d/--log-dir | 指定日志输出目录,默认值为 ./log |
60+
| -f/--log-file | 指定完整的日志文件路径(优先级高于 --log-dir) |
5961
| -?/--help | 显示帮助信息并退出|
6062
| -V/--version | 显示版本信息并退出,不能与其它参数混用 |
6163

@@ -166,10 +168,12 @@ taosgen -h 127.0.0.1 -c config.yaml
166168
- timestamp_offset:描述时间戳数值的偏移配置参数。
167169
- offset_type(字符串):表示时间戳偏移类型,可选值为:"relative"、"absolute"。
168170
- value(字符串或整型):表示时间戳的偏移量(relative)或起始时间戳(absolute):
169-
- 时间戳偏移类型为 "relative" 时:字符串类型,格式为 ±[数值][单位] 组合(示例:"+1d3h" 表示加 1 天 3 小时),支持以下时间单位:
171+
- 时间戳偏移类型为 "relative" 时:字符串类型,格式为 ±[数值][单位] 组合(示例:"+1d3h30m" 表示加 1 天 3 小时 30 分钟),支持以下时间单位:
170172
- y:年偏移量
171-
- m:月偏移量
173+
- M:月偏移量(大写)
172174
- d:天偏移量
175+
- h:小时偏移量
176+
- m:分钟偏移量(小写)
173177
- s:秒偏移量
174178
- 时间戳偏移类型为 "absolute" 时:整型或字符串类型,格式如下:
175179
- 时间戳数值(精度由 timestamp_precision 参数决定)

0 commit comments

Comments
 (0)