ID 272728 - [Not A Bug] Log messages in custom plugins do not appear anywhere

Follow

Problem summary:

 

Steps to reproduce:

1. Change plugins/Src/Ops/HelloWorld to include

    #include <FnLogging/FnLogging.h>
    FnLogSetup("HelloWorldOp")

2. And in the cook method:
    if (interface.atRoot())
    {
        FnLogDebug("######## my DEBUG Hello, Help Me!!!!");
        FnLogInfo("######## my INFO Hello, Help Me!!!!");
        FnLogWarn("######## my WARN Hello, Help Me!!!!");
        FnLogError("######## my ERROR Hello, Help Me!!!!");
        ...

3. Also change the plugins/Src/Ops/HelloWorld/CMakeLists.txt to include FnLogging:
    target_link_libraries(HelloWorldOp
        PRIVATE
        ...
        Katana::FnLogging

4. Follow the instructions in plugins/Src/README.md to build but ignoring paths to alembic/openexr/boost.

5. Run Katana with built plugins as resource:
    KATANA_RESOURCES=$HOME/MyKatanaResources $KATANA_HOME/katana

6. Add a GenericOp node with opType: HelloWorld connected to a node that creates /root (e.g. CameraCreate)
 

Expected behaviour:

Expected to see INFO and higher level messages printed on the console or in the katana.log

Actual behaviour:

None of the logged messages appear in the terminal nor in /tmp/katana.log

Workaround:

Calling setHost() for the logging should fix this issue.

For example, in plugins/Src/Ops/HelloWorld:

static void setup(Foundry::Katana::GeolibSetupInterface& interface)
{
    FnKat::FnLogging::setHost(getHost());
    interface.setThreading(
        Foundry::Katana::GeolibSetupInterface::ThreadModeConcurrent);
}

Custom plugins can also output messages via standard print statements (e.g. std::cout).

Reproduced versions/platforms:

  • Tested on 2.6v1b1 but it probably happens in earlier versions (not tested).

Customer version/platform:

Not supplied.

    We're sorry to hear that

    Please tell us why