You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To put things together. Any structured format string design is possible and the user can insert the $line (example) value:
6570
+
**To put things together:** Any structured format string design is possible and the user can insert the $line (example) value:
6571
6571
6572
6572
* directly as string (fastest execution, straight forward)
6573
6573
* indirectly as formatted string (fastest execution alignment option)
@@ -6578,7 +6578,7 @@ After `trice insert` we get this (compact JSON) log line according to `-stf` and
6578
6578
```C
6579
6579
void doStuff( void ){
6580
6580
// ...
6581
-
trice(iD(789), "{\"level\":\"info\",\"file\":\"val.c\",\"line\":\"321\",\"func\":\"doStuff \",\"taskID\":\"%04x\",\"fmt\":\"The answer is %d.\",\"uptime\":\"%08u us\"}\n', getTaskID(), 42, uptime());
6581
+
trice(iD(789), "{\"level\":\"info\",\"file\":\"val.c\",\"line\":\"321\",\"taskID\":\"%04x\",\"fmt\":\"The answer is %d.\",\"uptime\":\"%08u us\"}\n', getTaskID(), 42, uptime());
6582
6582
// ...
6583
6583
}
6584
6584
```
@@ -6601,35 +6601,35 @@ The appropriate Trice tool log line output would be similar to
6601
6601
6602
6602
```bash
6603
6603
{...}
6604
-
{"level":"info","file":"val.c","line":"321","func":"doStuff ","taskID":"0123","fmt":"The answer is 42.","uptime":"12345678 us"}
6604
+
{"level":"info","file":"val.c","line":"321","taskID":"0123","fmt":"The answer is 42.","uptime":"12345678 us"}
6605
6605
{...}
6606
6606
```
6607
6607
6608
-
When *stf* and *stv* are empty strings (default), `trice insert` and `trice clean` commands will work the ususal way. If they are not empty, the `trice insert` command will on each Trice statement use a heuristic to check if the context information was inserted already and update it or otherwise insert it. **ATTENTION:** That will work only if *stf* and *stv* where not changed by the user inbetween. The same way `trice clean` would remove the context information only, if *stf* and *stv* kept unchanged. If the user wants to change *stf* and *stv* during development, first a `trice clean` is needed. Use a `build.sh` script like this:
6608
+
When *stf* and *stv* are empty strings (default), `trice insert` and `trice clean` commands will work the ususal way. If they are not empty, the `trice insert` command will on each Trice statement use a heuristic to check if the context information was inserted already and update it or otherwise insert it. **ATTENTION:** That will work only, if *stf* and *stv* where not changed by the user inbetween. In the same way `trice clean` would remove the context information only, if *stf* and *stv* kept unchanged. If the user wants to change *stf* and *stv* during development, first a `trice clean` is needed. Use a `build.sh` script like this:
6609
6609
6610
6610
```bash
6611
6611
#!/bin/bash
6612
6612
6613
-
# Run "rm -rf ~/.trice/cache/*", after modifying $SLFMT and SLVAL !!!
6613
+
# Run "rm -rf ~/.trice/cache/*" automatically after changing this file !!!
0 commit comments