当前位置:网站首页>第十章 设置结构化日志记录(二)
第十章 设置结构化日志记录(二)
2022-06-26 12:36:00 【yaoxin521123】
第十章 设置结构化日志记录(二)
注:IRIS有,Cache无。
启用结构化日志记录
^LOGDMN 例程允许管理结构化日志记录;还有一个基于类的 API,将在下一节中介绍。
要使用 ^LOGDMN 启用结构化日志记录:
- 打开终端并输入以下命令:
set $namespace="%sys"
do ^LOGDMN
这将启动一个带有以下提示的例程:
1) Enable logging
2) Disable logging
3) Display configuration
4) Edit configuration
5) Set default configuration
6) Display logging status
7) Start logging
8) Stop logging
9) Restart logging
LOGDMN option?
- 按
4以便可以指定配置详细信息。然后,该例程会提示输入以下项目:
a. 最低日志级别,以下之一:
-2— 详细的调试消息(例如十六进制转储)。-1— 不太详细的调试消息。0— 信息性消息,包括所有审计事件。1(默认值)— 警告,表示可能需要注意但未中断操作的问题。2— 严重错误,表明问题已中断操作。3— 致命错误,表示问题导致系统无法运行。
b. 管道命令,它指定系统将结构化日志发送到哪里。输入以下形式的响应:
irislogd -f c:/myfilename.log
但将 c:/myfilename.log 替换为目标日志文件的完全限定路径名。在此命令中,irislogd 是 可执行文件的名称,它将接收日志数据并将其写入指定文件(通过 -f 选项)。
对于管道命令,最简单的选择是使用此处提到的可执行文件 (irislogd.exe),但可以替换为不同的目标。
c. 发送到管道的数据格式。指定 NVP(默认)或 JSON。选项 NVP 发送由名称-值对组成的数据,以空格分隔。选项 JSON 在 JSON 输出中发送数据。
d. 对管道命令的连续调用之间的间隔(以秒为单位)。默认值为 10 秒。
当例程再次显示主提示时(LOGDMN 选项?),按 1 启用日志记录。
按 7 开始记录。




用于结构化日志记录的基于类的 API
要管理结构化日志记录,可以使用 %SYS 命名空间中的 SYS.LogDmn 类,而不是使用 ^LOGDMN 例程。
irislogd 的其他选项
Argument | Purpose |
|---|---|
-d | 发出诊断和错误消息 |
-e | errfilename 将错误和诊断消息写入给定文件。 |
-f | logfilename 将日志消息写入给定文件。 |
-h | hostname 在结构化日志文件中包含给定的主机名。 |
-i | irisinstance 在结构化日志文件中包含给定的实例名称。 |
-s | 将日志消息写入 Unix syslog 工具(仅限 Unix) |
此外,可以将输出写入标准输出。要在 Unix 上执行,请同时省略 -f 和 -s 参数。要在 Windows 上执行此操作,请省略 -s 参数。
边栏推荐
- imagecopymerge
- 几行代码就能实现复杂的 Excel 导入导出,这个工具类真心强大!
- Demand scale forecast and investment competitiveness analysis report of China's new material market 2022-2028
- Software testing - Fundamentals
- Splunk iowait 报警的解决
- Less than 40 lines of code to create a blocprovider
- NFS shared storage service installation
- 710. random numbers in the blacklist
- nvm安装教程
- Scala-day01- companion objects and HelloWorld
猜你喜欢

Several rare but useful JS techniques

Build Pikachu shooting range and introduction

Basic principle of MOS tube and important knowledge points of single chip microcomputer
solo 博客系统的 rss 渲染失败

TP5 thinkphp5 report serialization of'closure'is not allowed

国标GB28181协议EasyGBS级联宇视平台,保活消息出现403该如何处理?

不到40行代码手撸一个BlocProvider

NoSQL mongodb - 01 introduction to NoSQL and mongodb

New routing file in laravel framework
![[极客大挑战 2019]RCE ME 1](/img/66/e135f7e5a7cbdeb5b697f3939a3402.png)
[极客大挑战 2019]RCE ME 1
随机推荐
Less than 40 lines of code to create a blocprovider
Xiaolong 888 was released, Xiaomi 11 was launched, and 14 manufacturers carried it in the first batch!
文件远程同步、备份神器rsync
Investment forecast and development strategy analysis report of China's rural sewage treatment industry in 2022
.NET MAUI 性能提升
Mongodb of NoSQL - 03 mongodb CRUD
Scala-day06- pattern matching - Generic
Installing MySQL under Linux (RPM package installation)
MySQL 自定义函数时:This function has none of DETERMINISTIC, NO SQL 解决方案
快手实时数仓保障体系研发实践
Scala-day01- companion objects and HelloWorld
Realize microservice load balancing (ribbon)
New routing file in laravel framework
Demand scale forecast and investment competitiveness analysis report of China's new material market 2022-2028
Several methods added to the ES6 array (foreach, filter, some, every. Includes, reduce)
KITTI Tracking dataset whose format is letf_top_right_bottom to JDE normalied xc_yc_w_h
国标GB28181协议EasyGBS视频平台TCP主动模式拉流异常情况修复
JS how to judge when data contains integer and floating-point types. Floating-point decimals retain two digits after the decimal point
"Pinduoduo and short video speed version", how can I roast!
Summary of some application research cases of UAV Remote Sensing in forest monitoring