---
title: 开启审计日志记录
description: "开启审计日志，可全面记录Agent的所有操作行为，包括Shell命令、文件读写与API调用，实现操作可追溯。"
url: https://www.hikunpeng.com/document/detail/zh/kunpengaiagent/bestpractice/aiagent-0061.html
sourcePath: /source/zh/kunpengaiagent/bestpractice/aiagent-0061.html
indexId: 0d3e4486dd5d8ad52997e2d254f597e8664c2b6b5d75a976f060268ab50dfbd556
---
# 开启审计日志记录

开启审计日志，可全面记录Agent的所有操作行为，包括Shell命令、文件读写与API调用，实现操作可追溯。

#### 操作步骤

OpenClaw提供了完整的安全审计命令，会检查包括日志配置在内的各项安全设置。

1. 运行安全审计（检查当前配置）。

```
openclaw security audit
```


2. 深度审计（包含端口探测）。

```
openclaw security audit --deep
```


3. 自动修复常见安全问题。

```
openclaw security audit --fix
```
