Curio
中文/汉语
中文/汉语
  • 什么是Curio?| What is Curio?
  • 设计 | Design
    • 密封 | Sealing
    • 和谐任务 | Harmony Tasks
  • 入门 | Getting Started
  • 版本 | Versions
  • 安装 | Installation
  • 设置 | Setup
  • Curio服务 | Curio Service
  • 存储配置 | Storage Configuration
  • 配置 | Configuration
    • 监听地址 | Listen Address
    • 警报管理器 | Alert Manager
    • 默认Curio配置 | Default Curio Configuration
  • 启用市场 | Enabling market
  • 快速交易 | Snap Deals
  • 使用SupraSeal进行批量密封 | Batch Sealing with SupraSeal
  • 扩展Curio集群 | Scaling Curio cluster
  • Curio图形用户界面 | Curio GUI
  • 垃圾回收 | Garbage Collection
  • 最佳实践 | Best Practices
  • 日志记录 | Logging
  • Curio命令行界面 | Curio CLI
    • Curio
    • Sptool
  • API
Powered by GitBook
On this page
  • Logging
  • 日志记录
  • Log file configuration
  • 日志文件配置

日志记录 | Logging

本指南描述如何在Curio中更新日志记录首选项。

Logging

日志记录

Log file configuration

日志文件配置

每个Curio节点生成Go日志,如果您以systemd服务的方式运行Curio,默认情况下这些日志会被定向到/var/log/curio/curio.log文件。

Redirect Go logs to a file

将Go日志重定向到文件

默认情况下,如果不作为systemd服务运行,Curio会将所有日志重定向到标准输出。要更改此行为,请将以下变量添加到.bashrc文件中,并重启curio进程,以开始将所有日志重定向到文件。

export GOLOG_OUTPUT=FILE >> ~/.bashrc
export GOLOG_FILE="$HOME/curio.log" >> ~/.bashrc && source ~/.bashrc

Redirect Rust logs to a standard output

将Rust日志重定向到标准输出

默认情况下,rust-fil-proof使用的fil_logger库不会记录任何内容。您可以通过将RUST_LOG环境变量设置为另一个级别来更改此设置。这将在stderr上显示日志输出,可以通过systemd或在手动启动curio进程时在shell中将其重定向到文件。

使用systemd服务文件:

export RUST_LOG=info >> /etc/curio.env systemctl restart curio.service

手动运行Curio:

export RUST_LOG=info >> ~/.bashrc && source ~/.bashrc

日志级别可以在5个选项之间选择:

  • trace

  • debug

  • info

  • warn

  • error

Change logging verbosity

更改日志记录详细程度

可以在不重启服务或进程的情况下更改curio日志的详细程度。可以使用以下命令列出curio进程中的不同子系统,并更改单个子系统的详细程度,以获得更多/更少的详细日志。

curio cli --machine log list

要更改详细程度,请运行:

curio cli --machine log set-level --system chain debug

日志级别可以在4个选项之间选择:

  • debug

  • info

  • warn

  • error

您可以指定多个子系统,以一次更改多个子系统的日志级别。

curio cli --machine log set-level --system chain --system chainxchg debug

Previous最佳实践 | Best PracticesNextCurio命令行界面 | Curio CLI

Last updated 7 months ago