Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Shiva-Shadowsong committed Oct 2, 2024
2 parents 1b989c0 + 6a64a30 commit 2df8406
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 29 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ func generate_loot_for(recipient : Creature):
```

## Class Name Extraction
A neat feature pulled I from [LogDuck](https://github.com/ZeeWeasel/LogDuck "LogDuck") *(also a neat logging library worth checking out)*, which allows you to see the names of the classes that prompted Loggie to output something.* This only works when the engine debugger is connected, therefore it does not work in Release mode, and won't be shown in those logs.*
A neat feature pulled I from [LogDuck](https://github.com/ZeeWeasel/LogDuck "LogDuck") *(also a cool logging library worth checking out)*, which allows you to see the names of the classes that prompted Loggie to output something.* This only works when the engine debugger is connected, therefore it does not work in Release mode, and won't be shown in those logs.*

![ClassNameExtraction](https://i.imgur.com/EWlcKnD.png)

Expand Down
43 changes: 15 additions & 28 deletions docs/USER_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,19 @@ Loggie allows you to compose and style messages then send them to the output, wh
Let's explore some of the features.

# TOC
- [User Guide](#user-guide)
- [TOC](#toc)
- [Log Files and Storage](#log-files-and-storage)
- [Composing Messages](#composing-messages)
- [Creating a message](#creating-a-message)
- [Styling a message](#styling-a-message)
- [bold()](#bold)
- [italic()](#italic)
- [header()](#header)
- [color(color : String | Color)](#colorcolor--string--color)
- [box(h\_padding: int = 4)](#boxh_padding-int--4)
- [nl(amount: int = 1)](#nlamount-int--1)
- [hseparator(size: int = 16, alternative\_symbol: Variant = null)](#hseparatorsize-int--16-alternative_symbol-variant--null)
- [prefix(prefix : String, separator : String = "")](#prefixprefix--string-separator--string--)
- [suffix(suffix : String, separator : String = "")](#suffixsuffix--string-separator--string--)
- [Outputting a message](#outputting-a-message)
- [Extras](#extras)
- [Adjusting Message Formats](#adjusting-message-formats)
- [Preprocessing](#preprocessing)
- [Validity Checks:](#validity-checks)
- [Log Levels](#log-levels)
- [Domains](#domains)
- [Class Name Derivation](#class-name-derivation)
- [Timestamps](#timestamps)
- [Terminal Mode](#terminal-mode)
- [BBCode](#bbcode)
- [ANSI](#ansi)
- [Plain](#plain)
- [Custom Settings](#custom-settings)
- [Log Levels](#log-levels)
- [Domains](#domains)
- [Class Name Derivation](#class-name-derivation)
- [Timestamps](#timestamps)
- [Terminal Mode](#terminal-mode)
- [Custom Settings File](#custom-settings)
- [Notable Technicalities](#notable-technicalities)

# Log Files and Storage
Expand All @@ -55,8 +39,8 @@ All messages loggie works with are instances of `LoggieMsg`, a string wrapper cl

To create a `LoggieMsg` and fill it with some starting content, we can use the `Loggie.msg(...)` helper method:

```
Loggie.msg("Hello world.")
```gdscript
Loggie.msg("Hello world.")
```

## Styling a message
Expand Down Expand Up @@ -253,10 +237,11 @@ All LoggieMsgs, before being output, are preprocessed, unless `preprocessed(fals
Terminal mode determines the way the final preprocessing step will go.
Based on what the target terminal is, the content of the message will be converted so that it can render properly on that terminal.

A setting allows you to change the terminal mode:
* A setting allows you to change the terminal mode:
* LoggieSettings.terminal_mode
* Loggie Project Settings -> General -> Terminal Mode


3 terminal modes exist:

#### BBCode
Expand All @@ -269,8 +254,10 @@ While this mode is used, the generated `.log` files may still include unwanted B
The use of this mode is recommended for users that are viewing the console output in a non-Godot console, such as Powershell, Bash, etc. If you are using VSCode or some other external editor to develop your project, use this.

#### Plain
Output will be raw plain text. Use this mode when you want to check how i
Loggie automatically switched to this mode when it detects that it's running in a release build with Debug features disabled.
Output will be raw plain text. Best for raw output that has to be stored in a `.log` file.
Most likely, you won't use this mode by picking it manually. Instead -
Loggie automatically switches to this mode when it detects that it's running in a Release build with Debug features disabled.
This is great because during local development, you can use the fancy modes (BBCode / ANSI), and not have to worry that style symbols will appear in the `.log` files on Release.

# Custom Settings
Loggie will, before loading the settings from the default settings script (`loggie_settings.gd`), attempt to look for a script called `custom_settings.gd` in the same folder where `loggie.gd` is located.
Expand Down Expand Up @@ -300,4 +287,4 @@ Any other color will be displayed in the Godot console or an ANSI based console,

Therefore, if you want to use supported colors, always write them as `[color=red]` or use `.color(Color.RED)` which will automatically handle the rest for you.

----
----

0 comments on commit 2df8406

Please sign in to comment.