SinisterRectus / Discordia

Discord API library written in Lua for the Luvit runtime environment
MIT License
697 stars 143 forks source link

Logger pretty newlines #320

Open RiskoZoSlovenska opened 2 years ago

RiskoZoSlovenska commented 2 years ago

This pull request adds a new boolean client option prettyNewlines (true by default) and a new Logger option + mutators which, when true, makes the logger pad newlines so that they align with the timestamp label. This is just a cosmetic change to make logging multi-line strings neater.

As an example, what before was:

2021-10-23 15:31:25 | [INFO]     | Hi!
This is a
multiline string!

now becomes:

2021-10-23 15:31:25 | [INFO]     | Hi!
                                 | This is a
                                 | multiline string!