mirror of
https://github.com/wailsapp/wails.git
synced 2026-03-14 22:55:48 +01:00
Fix log level reactivity.
Misc fixes and tweaks
This commit is contained in:
parent
4a5e4d3a5e
commit
082e695c83
5 changed files with 7 additions and 7 deletions
|
|
@ -67,7 +67,7 @@
|
|||
Example Code
|
||||
</div>
|
||||
{#if showCode}
|
||||
<Highlight class="allow-select" language="{lang}" {code} style="max-height: 500px;"/>
|
||||
<Highlight class="allow-select" language="{lang}" {code}/>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
</script>
|
||||
|
||||
<div data-wails-no-drag class={$darkMode ? "codeblock" : "codeblock-light"}>
|
||||
<Highlight class="allow-select" language="{lang}" {code} style="margin: -5px; max-height: 500px; font-size: 13px"/>
|
||||
<Highlight class="allow-select" language="{lang}" {code} style="margin: -5px; font-size: 13px"/>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
<div class="logging-form">
|
||||
<form data-wails-no-drag class="mw-full">
|
||||
<div class="form-group">
|
||||
<label for="Debug">Select Log Method</label>
|
||||
<div>Select Log Method</div>
|
||||
{#each loglevels as option, index}
|
||||
{#if index === $logLevel}
|
||||
<span style="margin-top: 5px; height: 20px; display: inline-block;"><hr style="width: 270px;display: inline-block; vertical-align: middle; margin-right: 10px"/> Current Log Level </span>
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ ERROR | I am an Error message
|
|||
WARN | I am a Warning message
|
||||
</FakeTerm>
|
||||
<br/>
|
||||
Custom loggers may be given to your Wails application. More details <Link href="https://www.google.com">here</Link>.
|
||||
Custom loggers may be given to your Wails application. More details <Link href="https://wails.app">here</Link>.
|
||||
|
||||
<br/><br/>
|
||||
|
||||
|
|
|
|||
|
|
@ -19,11 +19,11 @@
|
|||
let logLevelUpper = loglevelText.toUpperCase();
|
||||
let logLevelNumber = Log.Level[logLevelUpper];
|
||||
setLogLevelMethod(logLevelNumber);
|
||||
logLevel.set(logLevelNumber);
|
||||
};
|
||||
$: lang = isJs ? 'Javascript' : 'Go';
|
||||
|
||||
let description = `You can set the log level using Log.SetLogLevel(). It accepts a log level (number) but the log levels supported have been added to Log: Log.TRACE
|
||||
`;
|
||||
let description = `You can set the log level using Log.SetLogLevel(). It accepts a log level (number) but there are consts available which may be used. See example code for more details.`;
|
||||
$: testcodeJs = "import { Log } from '@wails/runtime';\nLog.SetLogLevel(Log.Level." + loglevelText.toUpperCase() + ");";
|
||||
$: testcodeGo = 'import "github.com/wailsapp/wails/v2/pkg/logger"\n\n// runtime is given through WailsInit()\nruntime.Log.SetLogLevel(logger.' + loglevelText.toUpperCase() + ')';
|
||||
</script>
|
||||
|
|
@ -33,7 +33,7 @@
|
|||
<form data-wails-no-drag class="mw-full">
|
||||
<!-- Radio -->
|
||||
<div class="form-group">
|
||||
<label for="Debug">Select Logging Level</label>
|
||||
<div>Select Logging Level</div>
|
||||
{#each options as option}
|
||||
<div class="custom-radio">
|
||||
<input type="radio" name="logging" bind:group="{loglevelText}" id="{id}-{option}" value="{option}">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue