Files
Basalt2/docs/.vitepress/dist/assets/references_log.md.CTN7NLnt.js
2025-09-16 17:41:40 +02:00

2 lines
5.6 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import{_ as e,a as s,b as t,ag as i}from"./chunks/framework.BcrMLAmg.js";const u=JSON.parse('{"title":"Log","description":"","frontmatter":{},"headers":[],"relativePath":"references/log.md","filePath":"references/log.md","lastUpdated":1757795332000}'),o={name:"references/log.md"};function l(n,a,r,h,d,g){return t(),s("div",null,a[0]||(a[0]=[i('<h1 id="log" tabindex="-1">Log <a class="header-anchor" href="#log" aria-label="Permalink to &quot;Log&quot;"></a></h1><p><em>Logger module for Basalt. Logs messages to the console and optionally to a file.</em></p><h2 id="functions" tabindex="-1">Functions <a class="header-anchor" href="#functions" aria-label="Permalink to &quot;Functions&quot;"></a></h2><table tabindex="0"><thead><tr><th>Method</th><th>Returns</th><th>Description</th></tr></thead><tbody><tr><td><a href="#log-setlogtofile">Log.setLogToFile</a></td><td>-</td><td>Sets if the logger should log to a file</td></tr><tr><td><a href="#log-setenabled">Log.setEnabled</a></td><td>-</td><td>Sets if the logger should log</td></tr><tr><td><a href="#log-debug">Log.debug</a></td><td>-</td><td>Sends a debug message</td></tr><tr><td><a href="#log-info">Log.info</a></td><td>-</td><td>Sends an info message</td></tr><tr><td><a href="#log-warn">Log.warn</a></td><td>-</td><td>Sends a warning message</td></tr><tr><td><a href="#log-error">Log.error</a></td><td>-</td><td>Sends an error message</td></tr></tbody></table><h2 id="log-setlogtofile" tabindex="-1">Log.setLogToFile() <a class="header-anchor" href="#log-setlogtofile" aria-label="Permalink to &quot;Log.setLogToFile()&quot;"></a></h2><p>Sets if the logger should log to a file.</p><h2 id="log-setenabled" tabindex="-1">Log.setEnabled() <a class="header-anchor" href="#log-setenabled" aria-label="Permalink to &quot;Log.setEnabled()&quot;"></a></h2><p>Sets if the logger should log</p><h2 id="log-debug" tabindex="-1">Log.debug() <a class="header-anchor" href="#log-debug" aria-label="Permalink to &quot;Log.debug()&quot;"></a></h2><p>Sends a debug message to the logger.</p><h3 id="usage" tabindex="-1">Usage <a class="header-anchor" href="#usage" aria-label="Permalink to &quot;Usage&quot;"></a></h3><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">Log.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">debug</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;This is a debug message&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div><h2 id="log-info" tabindex="-1">Log.info() <a class="header-anchor" href="#log-info" aria-label="Permalink to &quot;Log.info()&quot;"></a></h2><p>Sends an info message to the logger.</p><h3 id="usage-1" tabindex="-1">Usage <a class="header-anchor" href="#usage-1" aria-label="Permalink to &quot;Usage&quot;"></a></h3><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">Log.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">info</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;This is an info message&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div><h2 id="log-warn" tabindex="-1">Log.warn() <a class="header-anchor" href="#log-warn" aria-label="Permalink to &quot;Log.warn()&quot;"></a></h2><p>Sends a warning message to the logger.</p><h3 id="usage-2" tabindex="-1">Usage <a class="header-anchor" href="#usage-2" aria-label="Permalink to &quot;Usage&quot;"></a></h3><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">Log.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">warn</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;This is a warning message&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div><h2 id="log-error" tabindex="-1">Log.error() <a class="header-anchor" href="#log-error" aria-label="Permalink to &quot;Log.error()&quot;"></a></h2><p>Sends an error message to the logger.</p><h3 id="usage-3" tabindex="-1">Usage <a class="header-anchor" href="#usage-3" aria-label="Permalink to &quot;Usage&quot;"></a></h3><div class="language-lua vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">lua</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">Log.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">error</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;This is an error message&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span></span></code></pre></div>',24)]))}const k=e(o,[["render",l]]);export{u as __pageData,k as default};