Skip to content

Commit

Permalink
docs: update contributing with logging instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
postables committed Aug 8, 2020
1 parent 07178bc commit 393863c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,21 @@ int main(void) {
}
```

# logging

The `logger.h` header defines a few macros to ease interaction with the logger system. After instantiating a `thread_logger` type, you can use the `LOG_INFO`, `LOG_WARN`, `LOG_ERROR`, or `LOG_DEBUG` macros as the method of logging. If you want `printf` style logging you can use `LOGF_INFO`, `LOGF_WARN`, `LOGF_ERROR`, or `LOGF_DEBUG`.

Examples:


```C
thread_logger *thl = new_thread_logger(true); /* enable debug logging */
LOG_INFO(thl, 0, "this is an info log");
LOGF_INFO(thl, 0, "this is an info log: %s", "yes");

```
# mbedtls
* [storing ecdsa context](https://forums.mbed.com/t/write-rsa-public-key-top-pem/4524/2)
Expand Down

0 comments on commit 393863c

Please sign in to comment.