This commit is contained in:
NoryiE
2025-02-17 09:21:32 +00:00
parent 52b3ac9ae1
commit 6d4db0b931
4 changed files with 234 additions and 32 deletions

View File

@@ -4,28 +4,67 @@
|Field|Type|Description|
|---|---|---|
|_logs|`table`|The complete log history|
|_enabled|`boolean`|If the logger is enabled|
|_logToFile|`boolean`|If the logger should log to a file|
|_logFile|`string`|The file to log to|
|LEVEL|`table`|The log levels|
## Functions
|Method|Returns|Description|
|---|---|---|
|[Log.error](#Log.error)|-|
|[Log.setEnabled](#Log.setEnabled)|-|
|[Log.setLogToFile](#Log.setLogToFile)|-|
|[Log.debug](#Log.debug)|-|Sends a debug message
|[Log.error](#Log.error)|-|Sends an error message
|[Log.info](#Log.info)|-|Sends an info message
|[Log.setEnabled](#Log.setEnabled)|-|Sets if the logger should log
|[Log.setLogToFile](#Log.setLogToFile)|-|Sets if the logger should log to a file
|[Log.warn](#Log.warn)|-|Sends a warning message
## Log.error()
## Log.debug()
Sends a debug message to the logger.
@vararg string The message to log
Sends an info message to the logger.
@vararg string The message to log
Sends a warning message to the logger.
@vararg string The message to log
### Usage
```lua
Log.debug("This is a debug message")
```
## Log.error(...)
Sends an error message to the logger.
@vararg string The message to log
### Parameters
* `...` *(vararg)* `string` The message to log
### Usage
```lua
Log.error("This is an error message")
```
## Log.info(...)
Sends an info message to the logger.
### Parameters
* `...` *(vararg)* `string` The message to log
### Usage
```lua
Log.info("This is an info message")
```
## Log.setEnabled()
sets if the logger should log
Sets if the logger should log
## Log.setLogToFile()
Sets if the logger should log to a file.
## Log.warn(...)
Sends a warning message to the logger.
### Parameters
* `...` *(vararg)* `string` The message to log
### Usage
```lua
Log.warn("This is a warning message")
```