Skip to content

Latest commit

 

History

History
14 lines (11 loc) · 854 Bytes

240605.logging_service.md

File metadata and controls

14 lines (11 loc) · 854 Bytes

https://discordapp.com/channels/918498540232253480/918498540232253483/1247923893583216711

floitsch — 06/05/2024 7:44 AM The way to make this work is to implement a service that handles logging/printing. (edited) Here is a tutorial for services: https://docs.toit.io/tutorials/containers/services And here is the LogService: https://libs.toit.io/system/api/log/class-LogService And for print it's here: https://libs.toit.io/system/api/print/class-PrintService There are two tests that could be interesting: https://github.com/toitlang/toit/blob/08540e7ae8e3351ced276e74dc34d42cb0a975e4/tests/services-print-test.toit https://github.com/toitlang/toit/blob/08540e7ae8e3351ced276e74dc34d42cb0a975e4/tests/services-log-test.toit

floitsch — 06/05/2024 8:31 AM Note that you can use print_ to directly print to the UART without going through any service.