Closed t0bst4r closed 1 month ago
Hi, could you please post to the discussion I created for your project so we have all the stuff in the same place?
1) Anyway every log written to this.log.debug gets printed, even when -debug is not set. Can you show me with a screenshot what do you mean? Cause is not clear for me where you see a debug printed when -debug is not enabled.
2) In the first link provided you are inside startExtension: that is an undocumented and no more maintained method that I left there in case I decide to continue that project (z2m extension). It is not supposed to be used. If you use it in your code please tell me that I have to verify that the code there is still up to date with Matterbridge.
3) OR EVEN BETTER a general -log [debug|info|warn|error] option could be added which configures BOTH loggers properly Is a good idea I will do it. Actually that is already managed that way in the frontend but the command line has been left behind...
I thought, if its really a bug, it's rather an issue than a discussion - if not, feel free to close the issue, and i'll post it to the discussion again.
I think I found the one, printing debug logs, which i was re-using by extending the MatterbridgeDevice
and using this.log
:
https://github.com/Luligu/matterbridge/blob/main/src/matterbridgeDevice.ts#L203
Hi, yes indeed, it's a bug. I was refactoring the console.log to AnsiLogger and it remained there unfinished. In the dev was correct so I didn't notice. Thanks.
I also added the parameter -matterlogger [debug | info | notice | warn | error | fatal] to set the matter.js Logger separately from the Matterbridge log. If you set fatal you turn off all matter.js messages. Thanks.
Tell me about the startExtension... if I need to check it please. For now I just deprecated it.
I will publish before evening:
Also this is done: https://github.com/Luligu/matterbridge/issues/51
This release is all about Matter 1.3
If you are wondering whether the controllers already support Matter 1.3, the answer is unfortunately no.
Only Home Automation supports:
and (probably only like BooleanState cluster)
At the moment the "-debug" flag seems to have the following effects:
defaultLogLevel
for theLogger
from matter.js (example here)logDebug
for theAnsiLogger
(example here)Anyway every log written to
this.log.debug
gets printed, even when-debug
is not set.It would be nice if:
-log [debug|info|warn|error]
option could be added which configures BOTH loggers properlyThank you!