Commit 595f62f5 authored by Riabokon Stanislav(EPAM)[GCP]'s avatar Riabokon Stanislav(EPAM)[GCP]
Browse files

Merge branch 'log-level-gcp' into 'master'

Log level gcp (GONRG-2101)

See merge request !80
parents e237f63e 32e0f5cb
Pipeline #33588 passed with stages
in 44 minutes and 45 seconds
server.servlet.contextPath=/api/register/v1
logging.level.org.springframework.web=DEBUG
logging.level.org.springframework.web=${LOG_LEVEL:DEBUG}
server.port=8080
LOG_PREFIX=register
JAVA_HEAP_OPTS=-Xms4096M -Xmx4096M
......
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<include resource="org/springframework/boot/logging/logback/defaults.xml"/>
<property resource="application.properties" />
<logger name="org.opengroup.osdu" level="${LOG_LEVEL}"/>
<springProfile name="local">
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
......@@ -8,7 +10,7 @@
<charset>utf8</charset>
</encoder>
</appender>
<root level="DEBUG">
<root level="info">
<appender-ref ref="CONSOLE"/>
</root>
</springProfile>
......@@ -28,7 +30,7 @@
</encoder>
</appender>
<root level="debug">
<root level="info">
<appender-ref ref="stdout"/>
</root>
</springProfile>
......
......@@ -66,7 +66,7 @@ public class SubscriberApi {
@PreAuthorize("@authorizationFilter.hasAnyPermission('" + ServiceRole.OPS + "', '" + ServiceRole.ADMIN + "', '" + ServiceRole.EDITOR + "')")
public ResponseEntity<Subscription> createSubscription(@RequestBody @Valid Subscription input) throws Exception {
input = createSubscription.get().run(input);
this.auditLogger.createSubscriptionSuccess(Collections.singletonList(input.toString()));
this.auditLogger.createSubscriptionSuccess(Collections.singletonList(input.getId()));
return new ResponseEntity<>(input, HttpStatus.CREATED);
}
......@@ -81,7 +81,7 @@ public class SubscriberApi {
@PreAuthorize("@authorizationFilter.hasAnyPermission('" + ServiceRole.OPS + "', '" + ServiceRole.ADMIN + "', '" + ServiceRole.EDITOR + "')")
public ResponseEntity<SubscriptionInfo> getSubscription(@PathVariable("id") @NotBlank String id) {
Subscription output = subscriptionRepository.get().get(id);
this.auditLogger.readSubscriptionSuccess(Collections.singletonList(output.toString()));
this.auditLogger.readSubscriptionSuccess(Collections.singletonList(output.getId()));
return new ResponseEntity<>(new SubscriptionInfo(output), HttpStatus.OK);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment