Skip to content

Commit

Permalink
main: add global trace log
Browse files Browse the repository at this point in the history
  • Loading branch information
sreimers committed Sep 27, 2023
1 parent 4d3551a commit 1a57756
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/main/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <re_net.h>
#include <re_sys.h>
#include <re_main.h>
#include <re_trace.h>
#include <re_btrace.h>
#include "main.h"

Expand Down Expand Up @@ -167,6 +168,10 @@ int libre_init(void)
return err;
}

#if RE_TRACE_ENABLED
re_trace_init("re_trace.json");
#endif

err = re_thread_init();

return err;
Expand All @@ -178,6 +183,10 @@ int libre_init(void)
*/
void libre_close(void)
{

#if RE_TRACE_ENABLED
re_trace_close();
#endif
(void)fd_setsize(0);
net_sock_close();
re_thread_close();
Expand Down

0 comments on commit 1a57756

Please sign in to comment.