Code Monkey home page Code Monkey logo

Comments (7)

gausby avatar gausby commented on July 29, 2024

Not sure if I am following this…no message is published to the MQTT server if you omit the handler in the config? Do you have any error messages in the stdout when you omit it?

Can't you just use the Tortoise.Handler.Default handler if you don't want to see log messages printed to stdout?

from tortoise.

Dipricyn avatar Dipricyn commented on July 29, 2024

Not sure if I am following this…no message is published to the MQTT server if you omit the handler in the config?

Right. Probably because the application crashes and is restarted afterwards.

Do you have any error messages in the stdout when you omit it?

I didn't get any error messages that's why the problem was particularly hard to identify.

Can't you just use the Tortoise.Handler.Default handler if you don't want to see log messages printed to stdout?

Yes, that works.
I just thought that it was counterintuitive to manually have to specify a Tortoise.Handler in order to effectively use no handler.
I'd recommend setting the Tortoise.Handler.Default handler if the user doesn't specify any handler.

from tortoise.

gausby avatar gausby commented on July 29, 2024

I think I will let the upcoming version of Tortoise crash if no handler has been specified. The handler will be more important in the future, as MQTT5 is more complex, and the user will have to take more callbacks into consideration.

Sorry for the late reply. I have been busy with life, and I hope I can get to add more maintainers when I am done with the MQTT 5 branch. Hope tortoise works well for you—would it be okay for me to close this issue ?

from tortoise.

Dipricyn avatar Dipricyn commented on July 29, 2024

I think I will let the upcoming version of Tortoise crash if no handler has been specified. The handler will be more important in the future, as MQTT5 is more complex, and the user will have to take more callbacks into consideration.

If it is necessary with MQTT 5 to always set a handler, then that's ok.
The point I am trying to make is that if the library can be used without a handler, then the user shouldn't manually have to specify that they want to use the Tortoise.Handler.Default handler.

If MQTT 5 requires the user to always define a custom handler, then this issue probably won't appear.

from tortoise.

gausby avatar gausby commented on July 29, 2024

I like that the user need to make a conscious choice of what should happen in the MQTT connection life-cycle. As such the Logger handler is only included to make it easy to get going, and for people to have an example to work from when they start implementing their own handler—the default one is there to use in integration tests where I don't care about the log output.

from tortoise.

Dipricyn avatar Dipricyn commented on July 29, 2024

I see. I get your design decision.
The issue can be closed.

from tortoise.

gausby avatar gausby commented on July 29, 2024

Cool; once again, thanks for using Tortoise…I am always happy to hear what you are using it for, so please share if you want and are allowed to :)

from tortoise.

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.