Commit Graph

18 Commits

Author SHA1 Message Date
Tom Fifield
e394bc6f8f
De-duplicate log-level determination (#5148)
RedirectablePrint had a method, getLogLevel, which did exactly
what code in SerialConsole did. Let's use that method rather than
duplicating the code.
2024-10-26 12:06:50 +02:00
Thomas Göttgens
05e4a639a1
remove newline from logging statements. (#5022)
remove newline from logging statements in code. The LOG_* functions will now magically add it at the end.

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2024-10-14 15:11:43 +11:00
Ben Meadors
9c46bdad1a
New new BLE logging characteristic with LogRecord protos (#4220)
* New UUID

* New log radio characteristic with LogRecord protobuf

* LogRecord

* Merge derp

* How did you get there

* Trunk

* Fix length

* Remove assert
2024-07-03 16:29:07 -05:00
geeksville
3219d65387
When talking via serial, encapsulate log messages in protobufs if necessary (#4187)
* clean up RedirectablePrint::log so it doesn't have three very different implementations inline.

* remove NoopPrint - it is no longer needed

* when talking to API clients via serial, don't turn off log msgs instead encapsuate them

* fix the build - would loop forever if there were no files to send

* don't use Segger code if not talking to a Segger debugger

* when encapsulating logs, make sure the strings always has nul terminators

* nrf52 soft device will watchdog if you use ICE while BT on...
so have debugger disable bluetooth.

* Important to not print debug messages while writing to the toPhone scratch buffer

* don't include newlines if encapsulating log records as protobufs

---------

Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2024-06-30 18:41:27 -05:00
Jonathan Bennett
6f3d7ca4d2 Trim extra vprintf and filter for unprintable characters 2024-06-28 23:30:39 -05:00
Jonathan Bennett
5263c738f3
Make the logs Colorful! (#4199) 2024-06-28 20:10:41 -05:00
Jonathan Bennett
79cfc4b725 Avoid Serial output mangling with RTOS. 2023-08-31 20:40:01 -05:00
Thomas Göttgens
b952c35da6 eliminate main source of multiline logging 2023-02-07 01:02:51 +01:00
Thomas Göttgens
51b2c431d9 trunk roundhouse kick 2023-01-21 21:23:24 +01:00
Thomas Göttgens
5fd00b2538 - make a template class for API Server
- Skip a lot of duplicate code
- add a hexDump output - might come in handy
- refactor directory names
- remove unused debugOut that was generating template errors
2023-01-09 17:03:52 +01:00
Ben Meadors
3eefd46ca1 Log levels log function 2022-12-30 07:48:59 -06:00
Ben Meadors
0b5cae5393 Log levels refactoring 2022-12-29 20:41:37 -06:00
majbthrd
f66c8572b4
use fixed-size buffer in RedirectablePrint::vprintf() (#1622)
Co-authored-by: Peter Lawrence <12226419+majbthrd@users.noreply.github.com>
Co-authored-by: Garth Vander Houwen <garthvh@yahoo.com>
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
2022-08-12 13:41:16 -05:00
Mike Kinney
caaa235c5d more cppcheck warnings fixes 2022-01-24 17:24:40 +00:00
Kevin Hester
772f2a15ff check more error codes 2021-03-09 16:45:40 +08:00
Kevin Hester
59577b9d79 add real formatted debug logging with timestamps 2020-12-25 15:17:56 +08:00
Kevin Hester
67e657f10f always print debug output to both serial and segger debug port
cc @mc-hamster, this  makes USE_SEGGER optional on nrf52 targets
2020-11-13 07:48:25 +08:00
geeksville
eb40013ddc Create RedirectablePrint and NoopPrint for serial debug redirection 2020-04-27 09:01:25 -07:00