Garmaine Staff asked 1 year ago

I am trying to reuse some custom java utilities in a robotframework library that have java.util.logging but this logging is not showing up in the console or the robotframework log.html.

It appears that any logging that happens while some static classes are being imported is displayed to the console and during the test anything that goes to System.out is redirected to the log.html.

However anything in the java classes that use logger.log(Level.INFO, "some text") is never seen.

DoStuff.java

import java.util.logging.Level;
import java.util.logging.Logger;

public class DoStuff {

    private static final String CLASSNAME = DoSTuff.class.getName();
    private static final Logger logger = Lobber.getLogger(CLASSNAME);

    public void initialize() {
        logger.log(Level.INFO, "print me please");
    }
}

MyJavaLibrary.py

import DoStuff

class MyJavaLibrary:

    def initialize(self):
        doStuff = DoStuff()
        doStuff.initialize()

*** Settings ***
Library    MyJavaLibrary

*** Test Cases ***
Test My Java Library
    initialize

Above is an example that I would expect the log "print me please" to either show up in the console or the log.html but it does not show up in either