Skip to content
This repository has been archived by the owner on Jan 14, 2021. It is now read-only.

Use a logger instead of puts #6

Closed
meew0 opened this issue Sep 24, 2016 · 8 comments
Closed

Use a logger instead of puts #6

meew0 opened this issue Sep 24, 2016 · 8 comments
Projects

Comments

@meew0
Copy link
Contributor

meew0 commented Sep 24, 2016

No description provided.

@RX14
Copy link
Contributor

RX14 commented Sep 27, 2016

Make sure to log raw message data from Gateway and REST to make generating error logs easier.

@RX14 RX14 added this to the 0.2.0 milestone Sep 27, 2016
@RX14
Copy link
Contributor

RX14 commented Oct 15, 2016

I think maybe we should be a little more verbose on debug. For example, we don't log REST requests, and logging of gateway messages is very inconsistent. I would like us to be able to reconstruct exactly what's happening on gateway and REST from a debug log.

@colinrioux
Copy link
Contributor

That's true, it would be more helpful.

However, that being said, this section from client.cr

rescue ex : JSON::ParseException
      LOGGER.error <<-LOG
        An exception occurred during message parsing! Please report this.
        #{ex}
        (pertaining to previous exception) Raised with packet:
        #{message}
        LOG
    rescue ex
      LOGGER.error <<-LOG
        A miscellaneous exception occurred during message handling.
        #{ex}
        LOG
    end
end

When logged using the logger or the many puts statements, can be extremely long for long servers (one being Discord Bots). It's not really an issue, but it would be nice to limit the log to the best that we can.

@RX14
Copy link
Contributor

RX14 commented Oct 15, 2016

@colinrioux if those errors are being gnerated there's either a bug in your code or a bug in discordcr and they should be reported. That's why it doesn't matter that they're long. They should be log so you notice them and report them... like it asks you.

Have you reported them?

@meew0
Copy link
Contributor Author

meew0 commented Oct 23, 2016

Closing this for now as the logger is implemented; please make further issues if there are still problems

@meew0 meew0 closed this as completed Oct 23, 2016
@RX14
Copy link
Contributor

RX14 commented Oct 23, 2016

See #6 (comment) for why this was left open

@RX14 RX14 reopened this Oct 23, 2016
@meew0
Copy link
Contributor Author

meew0 commented Oct 23, 2016

Yes, but that is not what this issue is about ("Use a logger instead of puts"). Further logging advances could be in their own issue

@meew0 meew0 removed this from the 0.2.0 milestone Oct 24, 2016
@RX14
Copy link
Contributor

RX14 commented Aug 29, 2017

ok

@RX14 RX14 closed this as completed Aug 29, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
1.0 release
Required for 0.2.0
Development

No branches or pull requests

3 participants