Conversation
|
resolves #64 |
|
Thanks for the pull request! So most of the changes you made were around moving loki to be a thing included by default in config files but I think I'd prefer to go with the approach of not having the "loki" object added to the config file at all in cases where people arent using it. Given that, I think that theres actually only one line that breaks the current mangobyte which is this one: |
|
@mdiller I agree that there are probably too many checks in this case, and that we can eliminate all unhandled exceptions by checking on that line. However, since each bot action logs a request to the Loki endpoint, you'll still get a stacktrace from the Loki emitter that'll fill up your local logs quickly
If you're fine with lots of local handled exceptions, then it's probably fine to keep in. I've added a new commit with the only 2 required change points:
|
- rolled back previous commit - fewer checks for loki configuration keys
9c2327c to
7e1a3b3
Compare
|
Hey! Circling back to this issue and taking a fresh look at it, I think the only real problem here is the line in cogs/general.py that does if settings.loki:
LOKI_APPLICATION_NAME = settings.loki["application"]Then that should fix the problem. I think I'd like to keep the rest of the behavior the same, that way theres no problem if nobody adds a "loki" key in the settings.json, and then if they do add "loki" but they didnt do the rest of the args right, it should error at them, to let them know that theyre doing something wrong. Sound good? |
Starting from scratch resulted in several errors due to missing values from the
lokiobject in the defaultsettings.jsonfilebase_urlcontent insettings.jsonparsing to avoid errorssettings.jsonfile creation