> For the complete documentation index, see [llms.txt](https://babyqdoc.gitbook.io/wechatdocs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://babyqdoc.gitbook.io/wechatdocs/lua-cha-jian-kai-fa/lualog-mo-kuai.md).

# Lua--Log模块

{% hint style="info" %}
导入模块

local log = require("log")

不支持Lua的Table和UserData输出
{% endhint %}

{% hint style="success" %}
local str = string.format("%d %s", 1,"字符串")

log.notice("From  Log\n%s", str)
{% endhint %}

{% hint style="warning" %}
log.info("From  Log\n%s", str)
{% endhint %}

{% hint style="danger" %}
log.error("From  Log\n%s", str)--错误日志信息会写到Logs目录日志文件里
{% endhint %}
