-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add first ecosystem modules, change package * Initial support for GCP * Improve azure, various adjustments * Add * Move common to to shared artifact, adjust packages * Remove properties * Adjust interceptor * More logging adjustments * Update documentation * Run exampe on newest spring boot * Bump version * Fix version * Adjust readme * Adjust example / docs * Adjust examples / docs
- Loading branch information
Showing
147 changed files
with
4,621 additions
and
223 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../azure/LogbookAzureAutoConfiguration.java → ...spring/LogbookAzureAutoConfiguration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...esources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
no.entur.logging.cloud.spring.logbook.azure.LogbookAzureAutoConfiguration | ||
no.entur.logging.cloud.azure.logbook.spring.LogbookAzureAutoConfiguration |
23 changes: 23 additions & 0 deletions
23
azure/request-response-spring-boot-starter-azure-grpc-ecosystem-test/build.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
|
||
dependencies { | ||
api project(":azure:spring-boot-autoconfigure-azure-test") | ||
api project(':azure:request-response-spring-boot-starter-azure-grpc-ecosystem') | ||
api project(':request-response:request-response-spring-boot-autoconfigure-grpc-ecosystem') | ||
|
||
api ("org.entur.jackson:jackson-syntax-highlight:${jacksonSyntaxHighlightVersion}") | ||
api ("org.entur.logback-logstash-syntax-highlighting-decorators:logback-logstash-syntax-highlighting-decorators:${logbackLogstashSyntaxHighlightingDecoratorsVersion}") | ||
|
||
api ("net.logstash.logback:logstash-logback-encoder:${logbackLogstashVersion}") | ||
api ("com.fasterxml.jackson.core:jackson-core:${jacksonVersion}") | ||
|
||
api("org.slf4j:slf4j-api:${slf4jVersion}") | ||
api("org.springframework.boot:spring-boot-autoconfigure:${springBootVersion}") | ||
implementation project(path: ':request-response:netty-grpc-test') | ||
|
||
testImplementation("org.springframework.boot:spring-boot-starter-test:${springBootVersion}") | ||
|
||
} | ||
|
||
|
||
|
||
|
59 changes: 59 additions & 0 deletions
59
...re/spring/grpc/ecosystem/test/RequestResponseAzureGrpcEcosystemTestAutoConfiguration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
package no.entur.logging.cloud.azure.spring.grpc.ecosystem.test; | ||
|
||
import no.entur.logging.cloud.spring.rr.grpc.AbstractRequestResponseGrpcSinkAutoConfiguration; | ||
import org.entur.jackson.jsh.AnsiSyntaxHighlight; | ||
import org.entur.jackson.jsh.DefaultSyntaxHighlighter; | ||
import no.entur.logging.cloud.rr.grpc.GrpcSink; | ||
import no.entur.logging.cloud.rr.grpc.test.CompositeSink; | ||
import no.entur.logging.cloud.rr.grpc.test.PrettyPrintingLogLevelLogstashLogbackGrpcSink; | ||
import no.entur.logging.cloud.rr.grpc.test.PrettyPrintingGrpcSink; | ||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
import org.slf4j.event.Level; | ||
import org.springframework.boot.autoconfigure.AutoConfigureBefore; | ||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; | ||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
|
||
@AutoConfigureBefore(value = { | ||
no.entur.logging.cloud.azure.spring.grpc.ecosystem.RequestResponseAzureGrpcEcosystemAutoConfiguration.class, | ||
}) | ||
|
||
@Configuration | ||
public class RequestResponseAzureGrpcEcosystemTestAutoConfiguration extends AbstractRequestResponseGrpcSinkAutoConfiguration { | ||
|
||
@Bean | ||
@ConditionalOnMissingBean(GrpcSink.class) | ||
public GrpcSink grpcSink() { | ||
Logger logger = LoggerFactory.getLogger(loggerName); | ||
Level level = parseLevel(loggerLevel); | ||
|
||
GrpcSink machineReadableSink = createMachineReadbleSink(logger, level); | ||
|
||
// emulate default intellij color scheme | ||
DefaultSyntaxHighlighter highlighter = DefaultSyntaxHighlighter.newBuilder() | ||
.withField(AnsiSyntaxHighlight.MAGENTA) | ||
.withBoolean(AnsiSyntaxHighlight.BLUE) | ||
.withNumber(AnsiSyntaxHighlight.BLUE) | ||
.withString(AnsiSyntaxHighlight.GREEN) | ||
.build(); | ||
|
||
GrpcSink humanReadablePlainSink = new PrettyPrintingGrpcSink.Builder() | ||
.withLogger(logger) | ||
.withLogLevel(level) | ||
.withSyntaxHighlighter(highlighter) | ||
.build(); | ||
|
||
GrpcSink humanReadableJsonSink = PrettyPrintingLogLevelLogstashLogbackGrpcSink.newBuilder() | ||
.withLogger(logger) | ||
.withLogLevel(level) | ||
.build(); | ||
|
||
return CompositeSink.newBuilder() | ||
.withMachineReadableJsonSink(machineReadableSink) | ||
.withHumanReadablePlainSink(humanReadablePlainSink) | ||
.withHumanReadableJsonSink(humanReadableJsonSink) | ||
.build(); | ||
} | ||
|
||
} |
1 change: 1 addition & 0 deletions
1
...esources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
no.entur.logging.cloud.azure.spring.grpc.ecosystem.test.RequestResponseAzureGrpcEcosystemTestAutoConfiguration |
13 changes: 13 additions & 0 deletions
13
...em-test/src/test/java/no/entur/logging/cloud/spring/logbook/web/test/DemoApplication.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package no.entur.logging.cloud.spring.logbook.web.test; | ||
|
||
import org.springframework.boot.SpringApplication; | ||
import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
|
||
@SpringBootApplication | ||
public class DemoApplication { | ||
|
||
public static void main(String[] args) { | ||
SpringApplication.run(DemoApplication.class, args); | ||
} | ||
|
||
} |
Oops, something went wrong.