Skip to content

Commit

Permalink
update logging page
Browse files Browse the repository at this point in the history
  • Loading branch information
dankmeme01 committed Jan 19, 2025
1 parent e9dea50 commit ec4bfbb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tutorials/logging.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ geode::log::debug("Filesize: {}", filesize);
geode::log::debug("Found node: {}", node->getID());
```

> :warning: Debug logs are not shown by default. See the [Log filtering](#log-filtering) section to see how you can change this behavior.
## Syntax
The logger uses [fmtlib](https://fmt.dev/latest/syntax.html) under the hood, which means you can use its syntax, which will get forwarded to fmtlib. Geode also provides formatters for a few common types, such as `CCPoint`, `CCNode`, etc.

Expand All @@ -59,11 +61,9 @@ The platform console is the quickest way to see the logs, running real time inga
![Image showing the platform console option ingame](/assets/geode_platform_console.png)
## Log levels
> :warning: As of the time of the last documentation update, log levels are **still being worked on**, and will be released soon, in **a future Geode update**.
## Log filtering
Log levels are a system that hide the less important logs from the **platform console** and the **log files generated by Geode**. The log level can be customized individually for both of these output locations, so you can have a log level of **info** for the log files, and a log level of **debug** for the platform console.
Log filtering is a system that hide the less important logs from the **platform console** and the **log files generated by Geode**. The log level can be customized individually for both of these output locations, so you can have a log level of **info** for the log files, and a log level of **debug** for the platform console.
The log level takes the value **debug**, **info**, **warn** or **error**. Setting the log level to one of those values will only allow logs with that level **or higher** to be written. For example, log level **warn** will only show **warns** and **errors**, while log level **info** will show **info**, **warn** and **error** logs. The default values of those log levels is **info** for both channels.
Expand Down

0 comments on commit ec4bfbb

Please sign in to comment.