Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MqttNetTrace #68

Closed
haeberle opened this issue Oct 19, 2017 · 8 comments
Closed

MqttNetTrace #68

haeberle opened this issue Oct 19, 2017 · 8 comments

Comments

@haeberle
Copy link

In my app I have to instantiate more than one client. Issue is, as long the MqttNetTrace is a static class, I’m not able to differentiate messages between the different client or server instances in my app. I defined an interface based on the MqttNetTrace and added the interface as property in the MqttServerOptions / MqttClientOptions and reimplement the MqttNetTrace based in the Interface but not static.
I’m not sure how I can share the changes, but from my view that helps to go away from a predefined static trace model.

Regards
Hans

@chkr1011
Copy link
Collaborator

Hi,
I will add the event of the trace class to the options. The write methods are only for internal purposes.

I am also interested in the use case for having multiple clients. Can you give me some details?

Best regards
Christian

@JTrotta
Copy link
Contributor

JTrotta commented Oct 20, 2017

@haeberle , yes please. Which are the case when more clients on the same machine are needed?
I'm curious.

@haeberle
Copy link
Author

Thanks Christian

sure, the app has to translate data between two or more brokers and also other protocols, like KNX, Siemens Logo, S7, etc. And also to act as a broker if needed.

@haeberle
Copy link
Author

I can share the code if needed, I did the trace changes already and the test is running...

@chkr1011
Copy link
Collaborator

@haeberle Thank you but sharing is not required. I already changed a lot due to new features. Writing it on my own seems to be faster 😄

Sounds like a smart home project. Tell me more. I also have a smart home project called "Wirehome" which is also here on GitHub. So I am very interested 😄

Best regards
Christian

@chkr1011
Copy link
Collaborator

@haeberle I refactored the tracing. You can find an example in the Wiki and the code in the develop branch. Please let me know if this fits your needs.

@haeberle
Copy link
Author

Perfect Christian, I will test it. Thanks a lot. I will share more infos about the project if I have stable Mqtt Service.
I did a tour on your IoT project, looks really great, I like the agent !

@chkr1011
Copy link
Collaborator

@haeberle Thanks 😄 I will close this ticket. If you need something please reopen it. @JanEggers is refactoring the tracing at the moment. So the API will change (a lot) but it is still possible to distinguish between the clients and also the server components.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants