Closed HellPie closed 7 years ago
sorry about the extra commits, gitkraken pulled them when syncing the repo and I didn't notice.
dw about the extra commits.
It's just me being an idiot and rewriting public history
If this is complete, I will merge this and add a note for Faith to revisit it
I don't like it either. With klasa it's easier cuz I just disable chalk altogether, but here unless I re-initialize clk
on every run(...)
there isn't really another way and afaik an if(!var)
is still faster than a new var assignment
Yeah it's fine. This logging system is pretty old and due for an update.
Btw this allows to potentially let the user specify their own format
object, main reason I moved from the switch
block to that.
My plan was to use it so that IPC could send the bot the preferred logging config, but this also opens it up for more customization for everyone.
Ah... Codacy is complaining about nested ternaries
I agree with Faith, we could remove chalk as a dependency and make it by ourselves using the special characters used for this task. As we are only using this in a single file.
@UnseenFaith @kyranet If you guys agree, I will merge this as an interim feature.
The nested ternary confuses me a bit to be honest, it's a bit hard to read.
good enough imo
Proposed Semver Increment Bump: PATCH (None?)
Changes Proposed in this Pull Request (List new items in CHANGELOG.MD)
wtf
andverbose
log types (wtf = What a Terrible Failure according to Android's Log class).verbose
log type.error
,warn
andwtf
only colors the text, not the background, to better show warns and errors.verbose
is colored grey (chalkdim
does not work in most Windows environments) to not spam too many colors for those who will need to read the logswtf
is marked as underlined and bold, and highlights the entire message to be instantly recognizable due to the fact it should only be used for extreme case scenarios and "Terrible Failures".formats
in log.js(If Applicable) What Issue does it fix?
Fixes... Nothing. The logs are more chill if there are no issues.
References