Log.gd, a gdscript pretty-printer

An asset by russmatney
The page banner background of a mountain and forest
Log.gd, a gdscript pretty-printer thumbnail image
Log.gd, a gdscript pretty-printer thumbnail image
Log.gd, a gdscript pretty-printer thumbnail image
Log.gd, a gdscript pretty-printer hero image

Quick Information

0 ratings
Log.gd, a gdscript pretty-printer icon image
russmatney
Log.gd, a gdscript pretty-printer

Log.gd provides static functions for printing colorized output. Theseare intended as drop-in replacements for `print(...)`.- `Log.pr(...)` - pretty print args in one line- `Log.prn(...)` - the same, but with newlines- `Log.warn(...)` - pretty-print without newlines AND push a warning via `push_warning`- `Log.err(...)` - pretty-print without newlines AND push a error via `push_error`This is very useful while developing, because your printed output is much more readable.Colorized outputThe colorized output really shines when showing nested data structures (`Arrays` and `Dictionaries`), but it's also very useful for other gdscript primitives, like `Vectors`, `NodePaths`, and `StringNames`. Support for more types is easily added, feel free to create an issue!Call-site prefixesLog's print functions will prefix the output with the name of the script the log comes from, including the line number.This call-site feature is really nice! Unfortunately it can only be used during development - it depends on `get_stack()`, which is not available in production builds or at `@tool` script time.Opt-in via duck-typingYou can opt-in to pretty-printing in your classes by implementing `to_printable()`, which Log will pickup via duck-typing.```gdscriptclass_name ExampleClassfunc to_printable(): return {val=12}func _ready():_ Log.pr(self) # colorized `{"val": 12}````Full docs here: https://russmatney.github.io/log.gd/#/

Supported Engine Version
4.0
Version String
v0.0.4
License Version
MIT
Support Level
community
Modified Date
9 months ago
Git URL
Issue URL

Roboto Mono Variable Font

This download contains Roboto Mono as both variable fonts and static fonts.

Roboto Mono is a variable font with this axis: wght

This means all the styles are contained in these files: RobotoMono-VariableFont_wght.ttf RobotoMono-Italic-VariableFont_wght.ttf

If your app fully supports variable fonts, you can now pick intermediate styles that aren’t available as static fonts. Not all apps support variable fonts, and in those cases you can use the static font files for Roboto Mono: static/RobotoMono-Thin.ttf static/RobotoMono-ExtraLight.ttf static/RobotoMono-Light.ttf static/RobotoMono-Regular.ttf static/RobotoMono-Medium.ttf static/RobotoMono-SemiBold.ttf static/RobotoMono-Bold.ttf static/RobotoMono-ThinItalic.ttf static/RobotoMono-ExtraLightItalic.ttf static/RobotoMono-LightItalic.ttf static/RobotoMono-Italic.ttf static/RobotoMono-MediumItalic.ttf static/RobotoMono-SemiBoldItalic.ttf static/RobotoMono-BoldItalic.ttf

Get started

  1. Install the font files you want to use

  2. Use your app's font picker to view the font family and all the available styles

Learn more about variable fonts

https://developers.google.com/web/fundamentals/design-and-ux/typography/variable-fonts https://variablefonts.typenetwork.com https://medium.com/variable-fonts

In desktop apps

https://theblog.adobe.com/can-variable-fonts-illustrator-cc https://helpx.adobe.com/nz/photoshop/using/fonts.html#variable_fonts

Online

https://developers.google.com/fonts/docs/getting_started https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Fonts/Variable_Fonts_Guide https://developer.microsoft.com/en-us/microsoft-edge/testdrive/demos/variable-fonts

Installing fonts

MacOS: https://support.apple.com/en-us/HT201749 Linux: https://www.google.com/search?q=how+to+install+a+font+on+gnu%2Blinux Windows: https://support.microsoft.com/en-us/help/314960/how-to-install-or-remove-a-font-in-windows

Android Apps

https://developers.google.com/fonts/docs/android https://developer.android.com/guide/topics/ui/look-and-feel/downloadable-fonts

License

Please read the full license text (LICENSE.txt) to understand the permissions, restrictions and requirements for usage, redistribution, and modification.

You can use them freely in your products & projects - print or digital, commercial or otherwise. However, you can't sell the fonts on their own.

This isn't legal advice, please consider consulting a lawyer and see the full license for all details.

Log.gd provides static functions for printing colorized output. These
are intended as drop-in replacements for `print(...)`.

- `Log.pr(...)` - pretty print args in one line
- `Log.prn(...)` - the same, but with newlines
- `Log.warn(...)` - pretty-print without newlines AND push a warning via `push_warning`
- `Log.err(...)` - pretty-print without newlines AND push a error via `push_error`

This is very useful while developing, because your printed output is much more readable.

Colorized output

The colorized output really shines when showing nested data structures (`Arrays` and `Dictionaries`), but it's also very useful for other gdscript primitives, like `Vectors`, `NodePaths`, and `StringNames`. Support for more types is easily added, feel free to create an issue!

Call-site prefixes

Log's print functions will prefix the output with the name of the script the log comes from, including the line number.

This call-site feature is really nice! Unfortunately it can only be used during development - it depends on `get_stack()`, which is not available in production builds or at `@tool` script time.

Opt-in via duck-typing

You can opt-in to pretty-printing in your classes by implementing `to_printable()`, which Log will pickup via duck-typing.

```gdscript
class_name ExampleClass

func to_printable():
return {val=12}

func _ready():_
Log.pr(self) # colorized `{"val": 12}`
```

Full docs here: https://russmatney.github.io/log.gd/#/

Reviews

0 ratings

Your Rating

Headline must be at least 3 characters but not more than 50
Review must be at least 5 characters but not more than 500
Please sign in to add a review

Quick Information

0 ratings
Log.gd, a gdscript pretty-printer icon image
russmatney
Log.gd, a gdscript pretty-printer

Log.gd provides static functions for printing colorized output. Theseare intended as drop-in replacements for `print(...)`.- `Log.pr(...)` - pretty print args in one line- `Log.prn(...)` - the same, but with newlines- `Log.warn(...)` - pretty-print without newlines AND push a warning via `push_warning`- `Log.err(...)` - pretty-print without newlines AND push a error via `push_error`This is very useful while developing, because your printed output is much more readable.Colorized outputThe colorized output really shines when showing nested data structures (`Arrays` and `Dictionaries`), but it's also very useful for other gdscript primitives, like `Vectors`, `NodePaths`, and `StringNames`. Support for more types is easily added, feel free to create an issue!Call-site prefixesLog's print functions will prefix the output with the name of the script the log comes from, including the line number.This call-site feature is really nice! Unfortunately it can only be used during development - it depends on `get_stack()`, which is not available in production builds or at `@tool` script time.Opt-in via duck-typingYou can opt-in to pretty-printing in your classes by implementing `to_printable()`, which Log will pickup via duck-typing.```gdscriptclass_name ExampleClassfunc to_printable(): return {val=12}func _ready():_ Log.pr(self) # colorized `{"val": 12}````Full docs here: https://russmatney.github.io/log.gd/#/

Supported Engine Version
4.0
Version String
v0.0.4
License Version
MIT
Support Level
community
Modified Date
9 months ago
Git URL
Issue URL

Open Source

Released under the AGPLv3 license

Plug and Play

Browse assets directly from Godot

Community Driven

Created by developers for developers