feat(stdlib): Mid M6 log levels and UUID v4
Close the mid-tier stdlib waves with filtered one-line logs and cryptographic UUID minting in lib/, plus golds and public demos. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
7d86ed1d9c
commit
f4b39dfe80
20 files changed
+430
-15
No files matched your search
@@ -0,0 +1,47 @@
|
||||
---
|
||||
title: lib/log
|
||||
description: Level-filtered one-line logs (Mid M6). Default level info.
|
||||
---
|
||||
|
||||
## set_level
|
||||
+ `level`
|
||||
|
||||
level is debug / info / warn / error.
|
||||
|
||||
**> host_log_set_level level=`level`**
|
||||
|
||||
## debug
|
||||
+ `text`
|
||||
|
||||
*line = > host_log_line level="debug" text=`text`*
|
||||
1. `line`
|
||||
> print text=`line`
|
||||
2. *
|
||||
****
|
||||
|
||||
## info
|
||||
+ `text`
|
||||
|
||||
*line = > host_log_line level="info" text=`text`*
|
||||
1. `line`
|
||||
> print text=`line`
|
||||
2. *
|
||||
****
|
||||
|
||||
## warn
|
||||
+ `text`
|
||||
|
||||
*line = > host_log_line level="warn" text=`text`*
|
||||
1. `line`
|
||||
> print text=`line`
|
||||
2. *
|
||||
****
|
||||
|
||||
## error
|
||||
+ `text`
|
||||
|
||||
*line = > host_log_line level="error" text=`text`*
|
||||
1. `line`
|
||||
> print text=`line`
|
||||
2. *
|
||||
****
|
||||
@@ -0,0 +1,8 @@
|
||||
---
|
||||
title: lib/uuid
|
||||
description: UUID v4 (Mid M6). Cryptographic random via getrandom.
|
||||
---
|
||||
|
||||
## v4
|
||||
|
||||
**> host_uuid_v4**
|
||||
@@ -0,0 +1,47 @@
|
||||
---
|
||||
title: lib/日志
|
||||
description: 按级别过滤的一行日志(中层 M6)。默认级别 info。
|
||||
---
|
||||
|
||||
## 设级别
|
||||
+ `级别`
|
||||
|
||||
级别:debug / info / warn / error(或 调试/信息/警告/错误)。
|
||||
|
||||
**> host_log_set_level level=`级别`**
|
||||
|
||||
## 调试
|
||||
+ `内容`
|
||||
|
||||
*line = > host_log_line level="debug" text=`内容`*
|
||||
1. `line`
|
||||
> 打印 内容=`line`
|
||||
2. *
|
||||
****
|
||||
|
||||
## 信息
|
||||
+ `内容`
|
||||
|
||||
*line = > host_log_line level="info" text=`内容`*
|
||||
1. `line`
|
||||
> 打印 内容=`line`
|
||||
2. *
|
||||
****
|
||||
|
||||
## 警告
|
||||
+ `内容`
|
||||
|
||||
*line = > host_log_line level="warn" text=`内容`*
|
||||
1. `line`
|
||||
> 打印 内容=`line`
|
||||
2. *
|
||||
****
|
||||
|
||||
## 错误
|
||||
+ `内容`
|
||||
|
||||
*line = > host_log_line level="error" text=`内容`*
|
||||
1. `line`
|
||||
> 打印 内容=`line`
|
||||
2. *
|
||||
****
|
||||
@@ -0,0 +1,8 @@
|
||||
---
|
||||
title: lib/标识
|
||||
description: UUID 版本 4(中层 M6)。经 getrandom 安全随机。
|
||||
---
|
||||
|
||||
## 版本4
|
||||
|
||||
**> host_uuid_v4**
|
||||
Reference in new issue
Block a user