Logging TCP to seperate file

I want to create a separate file for TCP.

I know how to create the separate file, yet I can’t seem to find the right name of the TCP binding for the logger.

I assumed it was “smarthome.binding.tcp” as indicated below, yet I’m receiving nothing in the newly created file.

# Logger - TCP
log4j.logger.org.eclipse.smarthome.binding.tcp = DEFAULT, tcp

# File appender - tcp.log
log4j.appender.tcp=org.apache.log4j.RollingFileAppender
log4j.appender.tcp.layout=org.apache.log4j.PatternLayout
log4j.appender.tcp.layout.ConversionPattern=%d{yyyy-MM-dd HH:mm:ss.SSS} [%-5.5p] [%-36.36c] - %m%n
log4j.appender.tcp.file=${openhab.logdir}/tcp.log
log4j.appender.tcp.append=true
log4j.appender.tcp.maxFileSize=10MB
log4j.appender.tcp.maxBackupIndex=10

It should be:

log4j.logger.org.openhab.binding.tcp = INFO, tcp

Also, take a look here: http://docs.openhab.org/administration/logging.html#defining-what-to-log

@Dim

That did the trick, thank you very much.

Squid

1 Like