devkitPro / wut

Let's try to make a Wii U Toolchain / SDK for creating rpx/rpl.
zlib License
236 stars 52 forks source link

Add support for a upcoming LoggingModule #175

Closed Maschell closed 2 years ago

Maschell commented 2 years ago

Aroma will have the concepts of "modules" will can exports functions like system rpls do. There will be a module for logging and this PR is implementing support for it.

Advantages of outsourcing the actual logging implementation into a module:

Recommended usage: Currently Aroma is not release and there are use cases where Aroma (and so also the LoggingModule) is simply not available. If this a possible scenario for the homebrew its recommened to fallback into another logging method like this:

if(!WHBLogModuleInit()){
    // If the logging module is not avaible use something different
    // e.g. WHBLogUdpInit(); or WHBLogCafeInit();
}

This PR also includes a fix for the WHBAddLogHandler to return TRUE if you try to add a loghandler which was already added before to allows this fallback behaviour.