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

Docker logs to file does not capture all logging? #642

Open
olavt opened this issue Mar 18, 2024 · 1 comment
Open

Docker logs to file does not capture all logging? #642

olavt opened this issue Mar 18, 2024 · 1 comment

Comments

@olavt
Copy link

olavt commented Mar 18, 2024

It seems to be an issue with how logs are done.

When I do a "docker logs matter-server > a.log", not all logging are written to a.log. A lot of the logging are just written to the console.

Here are some examples of logging that are not written to the log file:

2024-03-18 11:16:33 (Dummy-2) CHIP_ERROR [chip.native.DMG] Failed to establish CASE for re-subscription with error 'src/protocols/secure_channel/CASESession.cpp:553: CHIP Error 0x00000032: Timeout'
2024-03-18 11:16:33 (MainThread) INFO [matter_server.server.device_controller.node_2] Previous subscription failed with Error: 50, re-subscribing in 124563 ms...
2024-03-18 11:18:02 (Dummy-2) CHIP_ERROR [chip.native.EM] Failed to Send CHIP MessageCounter:71477996 on exchange 64626i sendCount: 4 max retries: 4
2024-03-18 11:18:06 (Dummy-2) CHIP_ERROR [chip.native.SC] CASESession timed out while waiting for a response from the peer. Current state was 4
2024-03-18 11:18:06 (Dummy-2) CHIP_ERROR [chip.native.DMG] Failed to establish CASE for re-subscription with error 'src/protocols/secure_channel/CASESession.cpp:553: CHIP Error 0x00000032: Timeout'
2024-03-18 11:18:06 (MainThread) INFO [matter_server.server.device_controller.node_2] Previous subscription failed with Error: 50, re-subscribing in 119886 ms...
2024-03-18 11:20:42 (MainThread) INFO [root] Re-subscription succeeded!
2024-03-18 11:20:42 (MainThread) INFO [matter_server.server.device_controller.node_2] Re-Subscription succeeded
2024-03-18 11:21:09 (Dummy-2) CHIP_ERROR [chip.native.DMG] Time out! failed to receive report data from Exchange: 64630i
2024-03-18 11:21:09 (MainThread) INFO [matter_server.server.device_controller.node_1] Previous subscription failed with Error: 50, re-subscribing in 277355 ms...
2024-03-18 11:28:42 (MainThread) INFO [root] Re-subscription succeeded!
2024-03-18 11:28:42 (MainThread) INFO [matter_server.server.device_controller.node_1] Re-Subscription succeeded

@agners
Copy link
Collaborator

agners commented Mar 21, 2024

Afaik, Docker logs logs to stdout what has been sent to stdout, and to stderr what has been sent to stderr. The Python logging system which the Python Matter Server uses logs to stderr by default. So if you want to forward things into a file, you'd use docker logs matter-server 2> a.log.

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

2 participants