Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SLF4JExporter #79

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

SLF4JExporter #79

wants to merge 1 commit into from

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