Skip to content

Conversation

@kortemik
Copy link

@kortemik kortemik commented Jan 3, 2023

No description provided.

@kortemik
Copy link
Author

kortemik commented Jan 4, 2023

<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="INFO">
    <Appenders>
        <Console name="Console" target="SYSTEM_OUT">
          <JsonLayout compact="false" eventEol="false" stacktraceAsString="true">
            <KeyValuePair key="ruuvi.tag_mac" value="${ctx:ruuvi.tag_mac}"/>
            <KeyValuePair key="ruuvi.tag_name" value="${ctx:ruuvi.tag_name}"/>
            <KeyValuePair key="ruuvi.data_format" value="${ctx:ruuvi.data_format}"/>
          </JsonLayout>
        </Console>
    </Appenders>
    <Loggers>
        <Root level="debug">
            <AppenderRef ref="Console" />
        </Root>
    </Loggers>
</Configuration>

while

jackson-annotations-2.14.1.jar
jackson-core-2.14.1.jar
jackson-databind-2.14.1.jar
log4j-slf4j-impl-2.17.1.jar

are present gives the desired output.

echo 'storage.method=slf4j' > ruuvi-collector.properties

and

java -Dlog4j.configurationFile=log4j2.xml -cp jackson-annotations-2.14.1.jar:jackson-core-2.14.1.jar:jackson-databind-2.14.1.jar:log4j-slf4j-impl-2.17.1.jar:ruuvi-collector-0.3.jar fi/tkgwf/ruuvi/Main

should do the trick.

@kortemik
Copy link
Author

kortemik commented Jan 4, 2023

we use this to deliver the data with our https://github.com/teragrep/jla_06 and i guess it basically would work for any slf4j capable transport

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant