How to import StructuredArgument for structured logging in scala using slf4j and logback
问题 This is probably a stupid question, but my scala knowledge is a bit lacking. I'm trying to implement structured logging in scala, and we're using slf4j/logback/logstash. I came across the following post: How does SLF4J support structured logging Which describes how to do it: import static net.logstash.logback.argument.StructuredArguments.*; /* * Add "name":"value" ONLY to the JSON output. * * Since there is no parameter for the argument, * the formatted message will NOT contain the key/value.