tsoding / nn.h

Simple stb-style header-only library for Neural Networks

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to fully suppress debug output from the linked libraries

hippietrail opened this issue · comments

At least on my Mac I get lots of debug output running adder, img2nn, etc. that's not output directly by nn.h code so must be coming from glfw and/or raylib.

I believe I suppressed the ones from raylib by adding

    SetTraceLogLevel(LOG_NONE);

at the start of the code that uses raylib. But I'm still getting lots of debug log stuff:

nn.h % ./adder
1   HIToolbox                           0x00000001902e05c8 _ZN15MenuBarInstance22EnsureAutoShowObserverEv + 120
2   HIToolbox                           0x00000001902e0188 _ZN15MenuBarInstance14EnableAutoShowEv + 60
3   HIToolbox                           0x0000000190283310 SetMenuBarObscured + 372
4   HIToolbox                           0x0000000190282ee8 _ZN13HIApplication15HandleActivatedEP14OpaqueEventRefhP15OpaqueWindowPtrh + 172
5   HIToolbox                           0x000000019027cfcc _ZN13HIApplication13EventObserverEjP14OpaqueEventRefPv + 296
6   HIToolbox                           0x0000000190243cd0 _NotifyEventLoopObservers + 176
7   HIToolbox                           0x000000019027c96c AcquireEventFromQueue + 432
8   HIToolbox                           0x000000019026bc84 ReceiveNextEventCommon + 320
9   HIToolbox                           0x000000019026bb2c _BlockUntilNextEventMatchingListInModeWithFilter + 72
10  AppKit                              0x0000000189e18424 _DPSNextEvent + 632
11  AppKit                              0x0000000189e175b4 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 728
12  libglfw.3.dylib                     0x000000010465b288 _glfwPlatformPollEvents + 156
13  adder                               0x00000001044c6b9c PollInputEvents + 1588
14  adder                               0x00000001044c64b4 EndDrawing + 596
15  adder                               0x00000001044a2b2c main + 1176
16  dyld                                0x000000018678fe50 start + 2544

Is this coming from glfw? How can I turn it off?

Or maybe it's coming from this Mac "HIToolbox" component? I searched and couldn't find whether glfw or raylib use it but I did find comments that it's been deprecated. Maybe one of these libraries is using outdated Mac frameworks? I couldn't find any bug reports about that if it's the case though. Anyone on Mac that knows more?