<?xml version="1.0" encoding="utf-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"><channel><title>MagicLen</title><link>https://magiclen.org/cn/tag/pretty_env_logger/</link><description>多元化原创文章，内容包罗万象，有编程语言、网站应用、软件介绍、硬件介绍、操作系统、旅行游记、专题采访、益智问题、文学创作，以及作者们的知识分享和作品分享。</description><language>zh-CN</language><lastBuildDate>Sun, 22 Nov 2026 18:49:38 +0800</lastBuildDate><atom:link href="https://magiclen.org/cn/tag/pretty_env_logger/feed/" rel="self" type="application/rss+xml"/><sy:updatePeriod>hourly</sy:updatePeriod><sy:updateFrequency>8</sy:updateFrequency><sy:updateBase>1970-01-01T00:00+00:00</sy:updateBase><item><title>如何让 Rust 的函数库或是应用程序输出日志(log)？</title><link>https://magiclen.org/cn/rust-log/</link><description><![CDATA[<img src="https://magiclen.org/wp-content/uploads/2018/04/rust-220x162.png" srcset="https://magiclen.org/wp-content/uploads/2018/04/rust-220x162.png 1x, https://magiclen.org/wp-content/uploads/2018/04/rust-440x324.png 2x, https://magiclen.org/wp-content/uploads/2018/04/rust-660x486.png 3x" alt>
撰写日志(logging)是调试(debug)和事件分析时经常会使用的方式。Rust 生态圈有 log 这个 crate，针对消息重要性（等级）提供了不同的宏让函数库或是应用程序输出日志(log)，不过它并没有限定日志最终会被输出到哪，Rust 开发者在引入有用到 log 这个 crate 的函数库后，可以自行决定日志的输出方式。]]></description><category>研究分享</category><category>Rust</category><category>Rust</category><category>env_logger</category><category>pretty_env_logger</category><category>simplelog</category><guid>https://magiclen.org/cn/rust-log</guid><pubDate>Tue, 27 Oct 2020 20:00:19 +0800</pubDate><dc:creator>Magic Len</dc:creator></item></channel></rss>