Merge ff7502fbab
into c61a8aea4c
This commit is contained in:
commit
98b679f5ac
2 changed files with 20 additions and 2 deletions
|
@ -25,7 +25,7 @@ repositories {
|
|||
group = "adservice"
|
||||
version = "0.1.0-SNAPSHOT" // CURRENT_OPENCENSUS_VERSION
|
||||
|
||||
def opencensusVersion = "0.15.0" // LATEST_OPENCENSUS_RELEASE_VERSION
|
||||
def opencensusVersion = "0.16.1" // LATEST_OPENCENSUS_RELEASE_VERSION
|
||||
def grpcVersion = "1.15.0" // CURRENT_GRPC_VERSION
|
||||
def prometheusVersion = "0.3.0"
|
||||
|
||||
|
@ -54,7 +54,9 @@ dependencies {
|
|||
"io.grpc:grpc-services:${grpcVersion}",
|
||||
"io.prometheus:simpleclient_httpserver:${prometheusVersion}"
|
||||
|
||||
runtime "io.opencensus:opencensus-impl:${opencensusVersion}",
|
||||
runtime "com.google.cloud:google-cloud-logging:1.45.0",
|
||||
"io.opencensus:opencensus-impl:${opencensusVersion}",
|
||||
"io.opencensus:opencensus-contrib-log-correlation-stackdriver:${opencensusVersion}",
|
||||
"io.netty:netty-tcnative-boringssl-static:2.0.8.Final"
|
||||
}
|
||||
}
|
||||
|
@ -106,6 +108,7 @@ task adService(type: CreateStartScripts) {
|
|||
applicationName = 'AdService'
|
||||
outputDir = new File(project.buildDir, 'tmp')
|
||||
classpath = jar.outputs.files + project.configurations.runtime
|
||||
defaultJvmOpts = ["-Djava.util.logging.config.file=./src/main/resources/logging.properties"]
|
||||
}
|
||||
|
||||
task adServiceClient(type: CreateStartScripts) {
|
||||
|
@ -113,6 +116,7 @@ task adServiceClient(type: CreateStartScripts) {
|
|||
applicationName = 'AdServiceClient'
|
||||
outputDir = new File(project.buildDir, 'tmp')
|
||||
classpath = jar.outputs.files + project.configurations.runtime
|
||||
defaultJvmOpts = ["-Djava.util.logging.config.file=./src/main/resources/logging.properties"]
|
||||
}
|
||||
|
||||
applicationDistribution.into('bin') {
|
||||
|
|
14
src/adservice/src/main/resources/logging.properties
Normal file
14
src/adservice/src/main/resources/logging.properties
Normal file
|
@ -0,0 +1,14 @@
|
|||
# This configuration file is based on the example at
|
||||
# https://github.com/GoogleCloudPlatform/java-docs-samples/blob/master/logging/jul/src/main/resources/logging.properties
|
||||
|
||||
.level = INFO
|
||||
|
||||
io.grpc.netty.level=INFO
|
||||
sun.net.level=INFO
|
||||
|
||||
handlers=com.google.cloud.logging.LoggingHandler
|
||||
|
||||
com.google.cloud.logging.LoggingHandler.formatter=java.util.logging.SimpleFormatter
|
||||
java.util.logging.SimpleFormatter.format=%3$s: %5$s%6$s
|
||||
|
||||
com.google.cloud.logging.LoggingHandler.enhancers=io.opencensus.contrib.logcorrelation.stackdriver.OpenCensusTraceLoggingEnhancer
|
Loading…
Add table
Add a link
Reference in a new issue