import{_ as s,o as a,c as o,a as n}from"./app.f643a53b.js";const e={},l=n(`<h1 id="\u8C03\u8BD5\u65E5\u5FD7" tabindex="-1"><a class="header-anchor" href="#\u8C03\u8BD5\u65E5\u5FD7" aria-hidden="true">#</a> \u8C03\u8BD5\u65E5\u5FD7</h1><blockquote><p>\u65E5\u5FD7\u662F\u8C03\u8BD5\u8FC7\u7A0B\u6700\u91CD\u8981\u7684\u4E00\u73AF\uFF0C<code>YukiHookAPI</code> \u4E3A\u5F00\u53D1\u8005\u5C01\u88C5\u4E86\u4E00\u5957\u7A33\u5B9A\u9AD8\u6548\u7684\u8C03\u8BD5\u65E5\u5FD7\u529F\u80FD\u3002</p></blockquote><h2 id="\u666E\u901A\u65E5\u5FD7" tabindex="-1"><a class="header-anchor" href="#\u666E\u901A\u65E5\u5FD7" aria-hidden="true">#</a> \u666E\u901A\u65E5\u5FD7</h2><p>\u4F60\u53EF\u4EE5\u8C03\u7528 <code>loggerD</code>\u3001<code>loggerI</code>\u3001<code>loggerW</code> \u6765\u5411\u63A7\u5236\u53F0\u6253\u5370\u666E\u901A\u65E5\u5FD7\u3002</p><p>\u4F7F\u7528\u65B9\u6CD5\u5982\u4E0B\u6240\u793A\u3002</p><blockquote><p>\u793A\u4F8B\u5982\u4E0B</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#ADBAC7;">loggerD(msg </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">&quot;This is a log&quot;</span><span style="color:#ADBAC7;">)</span></span>
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>\u6B64\u65F6\uFF0C<code>YukiHookAPI</code> \u4F1A\u8C03\u7528 <code>android.util.Log</code> \u4E0E (Xposed) \u5BBF\u4E3B\u73AF\u5883\u4E2D\u7684\u65E5\u5FD7\u529F\u80FD\u540C\u65F6\u6253\u5370\u8FD9\u6761\u65E5\u5FD7\u3002</p><p>\u65E5\u5FD7\u9ED8\u8BA4\u7684 <code>TAG</code> \u4E3A\u4F60\u5728 <code>YukiHookLogger.Configs.tag</code> \u4E2D\u8BBE\u7F6E\u7684\u503C\u3002</p><p>\u4F60\u4E5F\u53EF\u4EE5\u52A8\u6001\u81EA\u5B9A\u4E49\u8FD9\u4E2A\u503C\uFF0C\u4F46\u662F\u4E0D\u5EFA\u8BAE\u8F7B\u6613\u4FEE\u6539 <code>TAG</code> \u9632\u6B62\u8FC7\u6EE4\u4E0D\u5230\u65E5\u5FD7\u3002</p><blockquote><p>\u793A\u4F8B\u5982\u4E0B</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#ADBAC7;">loggerD(tag </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">&quot;YukiHookAPI&quot;</span><span style="color:#ADBAC7;">, msg </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">&quot;This is a log&quot;</span><span style="color:#ADBAC7;">)</span></span>
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>\u6253\u5370\u7684\u7ED3\u679C\u4E3A\u5982\u4E0B\u6240\u793A\u3002</p><blockquote><p>\u793A\u4F8B\u5982\u4E0B</p></blockquote><div class="language-text ext-text"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#adbac7;">[YukiHookAPI][D][\u5BBF\u4E3B\u5305\u540D]--&gt; This is a log</span></span>
<span class="line"><span style="color:#adbac7;"></span></span></code></pre></div><p>\u4F60\u8FD8\u53EF\u4EE5\u4F7F\u7528 <code>LoggerType</code> \u81EA\u5B9A\u4E49\u65E5\u5FD7\u6253\u5370\u7684\u7C7B\u578B\uFF0C\u53EF\u9009\u62E9\u4F7F\u7528 <code>android.util.Log</code> \u8FD8\u662F (Xposed) \u5BBF\u4E3B\u73AF\u5883\u4E2D\u7684\u65E5\u5FD7\u529F\u80FD\u6765\u6253\u5370\u65E5\u5FD7\u3002</p><p>\u9ED8\u8BA4\u7C7B\u578B\u4E3A <code>LoggerType.BOTH</code>\uFF0C\u542B\u4E49\u4E3A\u540C\u65F6\u4F7F\u7528\u8FD9\u4E24\u4E2A\u65B9\u6CD5\u6765\u6253\u5370\u65E5\u5FD7\u3002</p><p>\u6BD4\u5982\u6211\u4EEC\u4EC5\u4F7F\u7528 <code>android.util.Log</code> \u6765\u6253\u5370\u65E5\u5FD7\u3002</p><blockquote><p>\u793A\u4F8B\u5982\u4E0B</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#ADBAC7;">loggerD(tag </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">&quot;YukiHookAPI&quot;</span><span style="color:#ADBAC7;">, msg </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">&quot;This is a log&quot;</span><span style="color:#ADBAC7;">, type </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">LoggerType</span><span style="color:#ADBAC7;">.</span><span style="color:#F69D50;">LOGD</span><span style="color:#ADBAC7;">)</span></span>
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>\u6216\u4EC5\u4F7F\u7528 (Xposed) \u5BBF\u4E3B\u73AF\u5883\u4E2D\u7684\u65E5\u5FD7\u529F\u80FD\u6765\u6253\u5370\u65E5\u5FD7\uFF0C\u6B64\u65B9\u6CD5\u4EC5\u53EF\u5728 (Xposed) \u5BBF\u4E3B\u73AF\u5883\u4F7F\u7528\u3002</p><blockquote><p>\u793A\u4F8B\u5982\u4E0B</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#ADBAC7;">loggerD(tag </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">&quot;YukiHookAPI&quot;</span><span style="color:#ADBAC7;">, msg </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">&quot;This is a log&quot;</span><span style="color:#ADBAC7;">, type </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">LoggerType</span><span style="color:#ADBAC7;">.</span><span style="color:#F69D50;">XPOSED_ENVIRONMENT</span><span style="color:#ADBAC7;">)</span></span>
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>\u82E5\u4F60\u60F3\u667A\u80FD\u533A\u5206 (Xposed) \u5BBF\u4E3B\u73AF\u5883\u4E0E\u6A21\u5757\u73AF\u5883\uFF0C\u53EF\u4EE5\u5199\u4E3A\u5982\u4E0B\u5F62\u5F0F\u3002</p><blockquote><p>\u793A\u4F8B\u5982\u4E0B</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#ADBAC7;">loggerD(tag </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">&quot;YukiHookAPI&quot;</span><span style="color:#ADBAC7;">, msg </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">&quot;This is a log&quot;</span><span style="color:#ADBAC7;">, type </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">LoggerType</span><span style="color:#ADBAC7;">.</span><span style="color:#F69D50;">SCOPE</span><span style="color:#ADBAC7;">)</span></span>
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>\u8FD9\u6837 API \u5C31\u4F1A\u5728\u4E0D\u540C\u73AF\u5883\u667A\u80FD\u9009\u62E9\u6307\u5B9A\u7684\u65B9\u6CD5\u7C7B\u578B\u53BB\u6253\u5370\u8FD9\u6761\u65E5\u5FD7\u3002</p><div class="custom-container tip"><p class="custom-container-title">\u5C0F\u63D0\u793A</p><p>\u66F4\u591A\u529F\u80FD\u8BF7\u53C2\u8003 <a href="../public/com/highcapable/yukihookapi/hook/log/LoggerFactory#loggerd-method">loggerD</a>\u3001<a href="../public/com/highcapable/yukihookapi/hook/log/LoggerFactory#loggeri-method">loggerI</a> \u53CA <a href="../public/com/highcapable/yukihookapi/hook/log/LoggerFactory#loggerw-method">loggerW</a> \u65B9\u6CD5\u3002</p></div><h2 id="\u9519\u8BEF\u65E5\u5FD7" tabindex="-1"><a class="header-anchor" href="#\u9519\u8BEF\u65E5\u5FD7" aria-hidden="true">#</a> \u9519\u8BEF\u65E5\u5FD7</h2><p>\u4F60\u53EF\u4EE5\u8C03\u7528 <code>loggerE</code> \u6765\u5411\u63A7\u5236\u53F0\u6253\u5370 <code>E</code> \u7EA7\u522B\u7684\u65E5\u5FD7\u3002</p><p>\u4F7F\u7528\u65B9\u6CD5\u5982\u4E0B\u6240\u793A\u3002</p><blockquote><p>\u793A\u4F8B\u5982\u4E0B</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#ADBAC7;">loggerE(msg </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">&quot;This is an error&quot;</span><span style="color:#ADBAC7;">)</span></span>
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div><p>\u9519\u8BEF\u65E5\u5FD7\u7684\u7EA7\u522B\u662F\u6700\u9AD8\u7684\uFF0C\u65E0\u8BBA\u4F60\u6709\u6CA1\u6709\u8FC7\u6EE4\u4EC5\u4E3A <code>E</code> \u7EA7\u522B\u7684\u65E5\u5FD7\u3002</p><p>\u5BF9\u4E8E\u9519\u8BEF\u7EA7\u522B\u7684\u65E5\u5FD7\uFF0C\u4F60\u8FD8\u53EF\u4EE5\u5728\u540E\u9762\u52A0\u4E0A\u4E00\u4E2A\u5F02\u5E38\u5806\u6808\u3002</p><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#768390;">// \u5047\u8BBE\u8FD9\u5C31\u662F\u88AB\u629B\u51FA\u7684\u5F02\u5E38</span></span>
<span class="line"><span style="color:#F47067;">val</span><span style="color:#ADBAC7;"> throwable </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">Throwable</span><span style="color:#ADBAC7;">(...)</span></span>
<span class="line"><span style="color:#768390;">// \u6253\u5370\u65E5\u5FD7</span></span>
<span class="line"><span style="color:#ADBAC7;">loggerE(msg </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#96D0FF;">&quot;This is an error&quot;</span><span style="color:#ADBAC7;">, e </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> throwable)</span></span>
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>\u6253\u5370\u7684\u7ED3\u679C\u4E3A\u5982\u4E0B\u6240\u793A\u3002</p><blockquote><p>\u793A\u4F8B\u5982\u4E0B</p></blockquote><div class="language-text ext-text"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#adbac7;">[YukiHookAPI][E][\u5BBF\u4E3B\u5305\u540D]--&gt; This is an error</span></span>
<span class="line"><span style="color:#adbac7;"></span></span></code></pre></div><p>\u540C\u65F6\uFF0C\u65E5\u5FD7\u4F1A\u5E2E\u4F60\u6253\u5370\u6574\u4E2A\u5F02\u5E38\u5806\u6808\u3002</p><blockquote><p>\u793A\u4F8B\u5982\u4E0B</p></blockquote><div class="language-text ext-text"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#adbac7;">java.lang.Throwable</span></span>
<span class="line"><span style="color:#adbac7;">        at com.demo.Test.&lt;init&gt;(...) </span></span>
<span class="line"><span style="color:#adbac7;">        at com.demo.Test.doTask(...) </span></span>
<span class="line"><span style="color:#adbac7;">        at com.demo.Test.stop(...) </span></span>
<span class="line"><span style="color:#adbac7;">        at com.demo.Test.init(...) </span></span>
<span class="line"><span style="color:#adbac7;">        at a.a.a(...) </span></span>
<span class="line"><span style="color:#adbac7;">        ... 3 more</span></span>
<span class="line"><span style="color:#adbac7;"></span></span></code></pre></div><p>\u5728\u9519\u8BEF\u65E5\u5FD7\u4E2D\uFF0C\u4F60\u540C\u6837\u4E5F\u53EF\u4EE5\u4F7F\u7528 <code>LoggerType</code> \u6765\u6307\u5B9A\u5F53\u524D\u6253\u5370\u65E5\u5FD7\u6240\u7528\u5230\u7684\u65B9\u6CD5\u7C7B\u578B\u3002</p><div class="custom-container tip"><p class="custom-container-title">\u5C0F\u63D0\u793A</p><p>\u66F4\u591A\u529F\u80FD\u8BF7\u53C2\u8003 <a href="../public/com/highcapable/yukihookapi/hook/log/LoggerFactory#loggere-method">loggerE</a> \u65B9\u6CD5\u3002</p></div><h2 id="\u4FDD\u5B58\u65E5\u5FD7\u4E0E\u81EA\u5B9A\u4E49\u5143\u7D20" tabindex="-1"><a class="header-anchor" href="#\u4FDD\u5B58\u65E5\u5FD7\u4E0E\u81EA\u5B9A\u4E49\u5143\u7D20" aria-hidden="true">#</a> \u4FDD\u5B58\u65E5\u5FD7\u4E0E\u81EA\u5B9A\u4E49\u5143\u7D20</h2><p>\u4F60\u53EF\u4EE5\u4F7F\u7528 <code>YukiHookLogger.saveToFile</code> \u65B9\u6CD5\u76F4\u63A5\u4FDD\u5B58\u5F53\u524D\u5DF2\u6253\u5370\u7684\u5168\u90E8\u65E5\u5FD7\u5230\u6587\u4EF6\u3002</p><blockquote><p>\u793A\u4F8B\u5982\u4E0B</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#768390;">// \u8BF7\u6CE8\u610F\u4FDD\u5B58\u7684\u6587\u4EF6\u8DEF\u5F84\u5FC5\u987B\u62E5\u6709\u8BFB\u5199\u6743\u9650\uFF0C\u5426\u5219\u4F1A\u629B\u51FA\u5F02\u5E38</span></span>
<span class="line"><span style="color:#F69D50;">YukiHookLogger</span><span style="color:#ADBAC7;">.saveToFile(</span><span style="color:#96D0FF;">&quot;/sdcard/Documents/debug_log.log&quot;</span><span style="color:#ADBAC7;">)</span></span>
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div></div></div><p>\u4F60\u8FD8\u53EF\u4EE5\u4F7F\u7528 <code>YukiHookLogger.contents</code> \u83B7\u53D6\u5F53\u524D\u5DF2\u6253\u5370\u7684\u5168\u90E8\u65E5\u5FD7\u6587\u4EF6\u5185\u5BB9\u3002</p><blockquote><p>\u793A\u4F8B\u5982\u4E0B</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#768390;">// \u83B7\u53D6\u5F53\u524D\u5DF2\u6253\u5370\u7684\u5168\u90E8\u65E5\u5FD7\u6587\u4EF6\u5185\u5BB9</span></span>
<span class="line"><span style="color:#F47067;">val</span><span style="color:#ADBAC7;"> fileContent </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">YukiHookLogger</span><span style="color:#ADBAC7;">.contents</span></span>
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div></div></div><p>\u5982\u679C\u4F60\u9700\u8981\u4E00\u4E2A\u5B9E\u65F6\u65E5\u5FD7\u7684\u6570\u636E\u7ED3\u6784\u6570\u7EC4\uFF0C\u4F60\u53EF\u4EE5\u76F4\u63A5\u83B7\u53D6 <code>YukiHookLogger.inMemoryData</code> \u7684\u5185\u5BB9\u3002</p><blockquote><p>\u793A\u4F8B\u5982\u4E0B</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#768390;">// \u83B7\u53D6\u5F53\u524D\u5DF2\u6253\u5370\u7684\u5B9E\u65F6\u65E5\u5FD7\u6570\u636E\u7ED3\u6784\u6570\u7EC4</span></span>
<span class="line"><span style="color:#F69D50;">YukiHookLogger</span><span style="color:#ADBAC7;">.inMemoryData.forEach {</span></span>
<span class="line"><span style="color:#ADBAC7;">    it.timestamp </span><span style="color:#768390;">// \u83B7\u53D6\u65F6\u95F4\u6233</span></span>
<span class="line"><span style="color:#ADBAC7;">    it.time </span><span style="color:#768390;">// \u83B7\u53D6 UTC \u65F6\u95F4</span></span>
<span class="line"><span style="color:#ADBAC7;">    it.priority </span><span style="color:#768390;">// \u83B7\u53D6\u4F18\u5148\u7EA7</span></span>
<span class="line"><span style="color:#ADBAC7;">    it.msg </span><span style="color:#768390;">// \u83B7\u53D6\u6D88\u606F</span></span>
<span class="line"><span style="color:#ADBAC7;">    it.throwable </span><span style="color:#768390;">// \u83B7\u53D6\u5F02\u5E38</span></span>
<span class="line"><span style="color:#ADBAC7;">    </span><span style="color:#768390;">// ...</span></span>
<span class="line"><span style="color:#ADBAC7;">}</span></span>
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>\u5982\u679C\u4F60\u60F3\u5BF9\u5F97\u5230\u7684\u81EA\u5B9A\u4E49\u65E5\u5FD7\u6570\u636E\u8FDB\u884C\u683C\u5F0F\u5316\u6216\u4FDD\u5B58\u5230\u6587\u4EF6\uFF0C\u4F60\u53EA\u9700\u8981\u4F7F\u7528\u5982\u4E0B\u65B9\u6CD5\u5373\u53EF\u3002</p><blockquote><p>\u793A\u4F8B\u5982\u4E0B</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#768390;">// \u5047\u8BBE\u8FD9\u5C31\u662F\u4F60\u5F97\u5230\u7684\u81EA\u5B9A\u4E49\u65E5\u5FD7\u6570\u636E</span></span>
<span class="line"><span style="color:#F47067;">val</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">data:</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">ArrayList</span><span style="color:#F47067;">&lt;</span><span style="color:#F69D50;">YukiLoggerData</span><span style="color:#F47067;">&gt;</span></span>
<span class="line"><span style="color:#768390;">// \u683C\u5F0F\u5316\u65E5\u5FD7\u6570\u636E\u5230\u5B57\u7B26\u4E32</span></span>
<span class="line"><span style="color:#F47067;">val</span><span style="color:#ADBAC7;"> dataString </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> </span><span style="color:#F69D50;">YukiHookLogger</span><span style="color:#ADBAC7;">.contents(</span><span style="color:#F47067;">data</span><span style="color:#ADBAC7;">)</span></span>
<span class="line"><span style="color:#768390;">// \u4FDD\u5B58\u65E5\u5FD7\u6570\u636E\u5230\u6587\u4EF6</span></span>
<span class="line"><span style="color:#768390;">// \u8BF7\u6CE8\u610F\u4FDD\u5B58\u7684\u6587\u4EF6\u8DEF\u5F84\u5FC5\u987B\u62E5\u6709\u8BFB\u5199\u6743\u9650\uFF0C\u5426\u5219\u4F1A\u629B\u51FA\u5F02\u5E38</span></span>
<span class="line"><span style="color:#F69D50;">YukiHookLogger</span><span style="color:#ADBAC7;">.saveToFile(</span><span style="color:#96D0FF;">&quot;/sdcard/Documents/debug_log.log&quot;</span><span style="color:#ADBAC7;">, </span><span style="color:#F47067;">data</span><span style="color:#ADBAC7;">)</span></span>
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><div class="custom-container danger"><p class="custom-container-title">\u7279\u522B\u6CE8\u610F</p><p>\u4F60\u9700\u8981\u542F\u7528 <strong>YukiHookLogger.Configs.isRecord</strong> \u624D\u80FD\u83B7\u53D6\u5230 <strong>YukiHookLogger.inMemoryData</strong> \u7684\u5185\u5BB9\u3002</p><p>\u83B7\u53D6\u5230\u7684\u65E5\u5FD7\u6570\u636E\u5728 Hook APP (\u5BBF\u4E3B) \u53CA\u6A21\u5757\u8FDB\u7A0B\u4E2D\u662F\u76F8\u4E92\u9694\u79BB\u7684\u3002</p><p>\u4F60\u53EA\u80FD\u5728\u5BF9\u5E94\u7684\u8FDB\u7A0B\u4E2D\u83B7\u53D6\u5BF9\u5E94\u7684\u65E5\u5FD7\u6570\u636E\uFF0C\u5982\u679C\u4F60\u9700\u8981\u5728\u4EFB\u4F55\u5730\u65B9\u5B9E\u65F6\u5F97\u5230\u8FD9\u4E9B\u65E5\u5FD7\u6570\u636E\uFF0C\u8BF7\u53C2\u8003 <a href="xposed-channel">Xposed \u6A21\u5757\u4E0E\u5BBF\u4E3B\u901A\u8BAF\u6865</a>\u3001<a href="host-inject#%E6%B3%A8%E5%86%8C%E6%A8%A1%E5%9D%97-activity">\u6CE8\u518C\u6A21\u5757 Activity</a>\u3002</p><p>\u5982\u679C\u4F60\u53EA\u60F3\u901A\u8FC7\u6A21\u5757\u6216\u5BBF\u4E3B\u6765\u5B9E\u65F6\u5F97\u5230\u65E5\u5FD7\u6570\u636E\uFF0C\u8BF7\u53C2\u8003\u53EF\u9009\u65B9\u6848 <a href="../public/com/highcapable/yukihookapi/hook/xposed/channel/YukiHookDataChannel#obtainloggerinmemorydata-method">YukiHookDataChannel.obtainLoggerInMemoryData</a> \u65B9\u6CD5\u3002</p></div><p>\u4F60\u8FD8\u53EF\u4EE5\u4F7F\u7528 <code>YukiHookLogger.Configs.elements</code> \u81EA\u5B9A\u4E49\u8C03\u8BD5\u65E5\u5FD7\u5BF9\u5916\u663E\u793A\u7684\u5143\u7D20\u3002</p><p>\u6B64\u529F\u80FD\u9700\u8981\u5728 Hook \u5165\u53E3\u7C7B\u7684 <code>onInit</code> \u4E2D\u5BF9 <code>YukiHookAPI.Configs</code> \u8FDB\u884C\u914D\u7F6E\u3002</p><blockquote><p>\u793A\u4F8B\u5982\u4E0B</p></blockquote><div class="language-kotlin ext-kt line-numbers-mode"><pre class="shiki" style="background-color:#22272e;"><code><span class="line"><span style="color:#F47067;">override</span><span style="color:#ADBAC7;"> </span><span style="color:#F47067;">fun</span><span style="color:#ADBAC7;"> </span><span style="color:#DCBDFB;">onInit</span><span style="color:#ADBAC7;">() </span><span style="color:#F47067;">=</span><span style="color:#ADBAC7;"> configs {</span></span>
<span class="line"><span style="color:#ADBAC7;">    debugLog {</span></span>
<span class="line"><span style="color:#ADBAC7;">        </span><span style="color:#768390;">// ...</span></span>
<span class="line"><span style="color:#ADBAC7;">        elements(</span><span style="color:#F69D50;">TAG</span><span style="color:#ADBAC7;">, </span><span style="color:#F69D50;">PRIORITY</span><span style="color:#ADBAC7;">, </span><span style="color:#F69D50;">PACKAGE_NAME</span><span style="color:#ADBAC7;">, </span><span style="color:#F69D50;">USER_ID</span><span style="color:#ADBAC7;">)</span></span>
<span class="line"><span style="color:#ADBAC7;">    }</span></span>
<span class="line"><span style="color:#ADBAC7;">    </span><span style="color:#768390;">// ...</span></span>
<span class="line"><span style="color:#ADBAC7;">}</span></span>
<span class="line"></span></code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><div class="custom-container tip"><p class="custom-container-title">\u5C0F\u63D0\u793A</p><p>\u66F4\u591A\u529F\u80FD\u8BF7\u53C2\u8003 <a href="../public/com/highcapable/yukihookapi/hook/log/LoggerFactory#inmemorydata-field">YukiHookLogger.inMemoryData</a>\u3001<a href="../public/com/highcapable/yukihookapi/hook/log/LoggerFactory#contents-field">YukiHookLogger.contents</a>\u3001<a href="../public/com/highcapable/yukihookapi/hook/log/LoggerFactory#contents-method">YukiHookLogger.contents</a>\u3001<a href="../public/com/highcapable/yukihookapi/hook/log/LoggerFactory#savetofile-method">YukiHookLogger.saveToFile</a> \u65B9\u6CD5\u4EE5\u53CA <a href="../public/com/highcapable/yukihookapi/hook/log/LoggerFactory#configs-object">YukiHookLogger.Configs</a>\u3002</p></div>`,63),p=[l];function c(i,r){return a(),o("div",null,p)}const d=s(e,[["render",c],["__file","logger.html.vue"]]);export{d as default};
