If you write in JAVA for B4J / B4A you can use BA.Log(string) if you import the BA class. Underneath the bonnet in Class BA it does this
B4X:
public static void Log(String Message) {
System.out.println(Message == null ? "null" : Message);
}
With inline Java code you dont have to import the BA class. Just use BA.Log(......).