OH 3 Log View


trying to get some variables from my rules out to the logger by using logInfo(“loggerName”, “message”). But they are not showing up. Frontail is installed and I see generated infos from bindings at localhost:9001. Any ideas to look at and check?

Regards, René

show us the rule
if “message” is variable then
message without " "

logInfo("loggerName", message)
1 Like

message is not a variable - clear to not use " " for the variable.

As mentioned the rule is been processed, only the logging is not showing up in frontail… even not logInfo(“loggerName”, “message”) which should show in this case in the logger “message”.

Alternatively yu can also pass the variable into a string using {}:

logInfo("loggerName", "Some Variable is {}", variableName)
logInfo("loggerName", "Some Item has state {}", someItem.state.toString)

I understand, check if you have the right punctuation mark

logInfo(“loggerName”, “message”)  // error
logInfo("loggerName", "message") // ok

This is the rule…logInfo will not been shown.

 rule "Lueftungssteuerung"
            Item Luefterstufe changed
            var Number Sollstufe = Luefterstufe.state
            logInfo("TC2", Sollstufe.state)

Sollstufe is a variable, not an item, so it has no .state.
Try it without the .state

no change… and it raised an error

2021-01-11 21:43:38.222 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID ‘tecalor-3’ failed: An error occurred during the script execution: Could not invoke method: org.openhab.core.model.script.actions.Log.logInfo(java.lang.String,java.lang.String,java.lang.Object[]) on instance: null in tecalor

I forgot the requirements of logInfo ( two strings) , try it with Sollstufe.toString

ip:9001 is not showing anything, but the log file directly at openHAB-logs do so. Could it be that I’,m missing a log level?

When did frontal stopp working?
What version are you on?

its a fresh OH3 openhabian installation

:thinking: In this case I have no clue!

This one helped me fix front tail on a new openhabian install.