Code Monkey home page Code Monkey logo

Comments (7)

Syfaro avatar Syfaro commented on July 28, 2024

What would you suggest doing? A chan for errors?

Is there anywhere else this is an issue besides UpdateChan?

from telegram-bot-api.

nvx avatar nvx commented on July 28, 2024

I've been trying to work out what the most idiomatic pattern would be for this, but have come up short so far sadly.

Perhaps a log interface then a logger instance can be passed in (either the standard golang logger, or any of the other loggers that implement identical methods)?

from telegram-bot-api.

Syfaro avatar Syfaro commented on July 28, 2024

I wonder if it wouldn't just be easier to implement the function in your own code, considering the entire thing is 18 lines of code.

from telegram-bot-api.

nvx avatar nvx commented on July 28, 2024

hmm point, I had kind of expected it to rely on internal functions but it seems it doesn't.

If the functions used by it are considered public and not likely to change to private, then that does seem like a decent option in this case!

from telegram-bot-api.

Syfaro avatar Syfaro commented on July 28, 2024

All it's doing is looping a call to BotAPI.GetUpdates, which is always going to stay public.

I'm going to close this issue. If anyone has suggestions later, feel free to mention them and I'll reopen it!

from telegram-bot-api.

fabulias avatar fabulias commented on July 28, 2024

@Syfaro maybe we can use logrus instead log pkg because logrus offer a lot of logging layers (panic, debug, info, error, fatal, etc).

from telegram-bot-api.

vietvudanh avatar vietvudanh commented on July 28, 2024

I am having this problem too. I am using Uber's zap, with jsonl format. The internal logger keep printing out logs, e.g getUpdates resp:/req.
Of course those lines are not use anyway, but maybe in the future I would like to collect those logs too, so it needs to be configurable.

from telegram-bot-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.