Mrkol
Topic Author
Posts: 7
Joined: 23 Mar 2018, 15:07

Logging in the application framework.

24 Apr 2018, 09:14

I've looked through most of the documentation and still can't quite figure out how I should go about logging when using the application framework. If I understood everything correctly, Noesis::GUI::Init should be called to set the error, logging and memory handlers. Yet the Launcher::LoggingHandler field suggests that the Init method is called automatically by my application launcher class, and that handler is set. Never the less, no logs can be seen in the console. I have tried to call the init method manually, but it gets overridden by app launcher's call and no logging other than the "noesis initialized" message can be seen. How do I sort this out? It's impossible to debug xaml errors without logging so I really need it.
 
User avatar
jsantos
Site Admin
Posts: 2904
Joined: 20 Jan 2012, 17:18
Contact:

Re: Logging in the application framework.

24 Apr 2018, 11:13

By default, the Application Framework installs a logging handler than sends output using OutputDebugString or printf. What platform are you using?

You can change this default behavior by using SetLogHandler or if you are only interested in errors, you can use SetErrorHandler. XamlPlayer, whose source code is included, overrides the error handler to show the information on screen.
 
User avatar
jsantos
Site Admin
Posts: 2904
Joined: 20 Jan 2012, 17:18
Contact:

Re: Logging in the application framework.

24 Apr 2018, 11:15

Remember that the application framework source code is included in the SDK, you should use it as an example to create your own one.

Who is online

Users browsing this forum: samc and 1 guest