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

Log level gcp (GONRG-2101)

parent e237f63e
server.servlet.contextPath=/api/register/v1 server.servlet.contextPath=/api/register/v1
logging.level.org.springframework.web=DEBUG logging.level.org.springframework.web=${LOG_LEVEL:DEBUG}
server.port=8080 server.port=8080
LOG_PREFIX=register LOG_PREFIX=register
JAVA_HEAP_OPTS=-Xms4096M -Xmx4096M JAVA_HEAP_OPTS=-Xms4096M -Xmx4096M
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<configuration> <configuration>
<include resource="org/springframework/boot/logging/logback/defaults.xml"/> <include resource="org/springframework/boot/logging/logback/defaults.xml"/>
<property resource="application.properties" />
<logger name="org.opengroup.osdu" level="${LOG_LEVEL}"/>
<springProfile name="local"> <springProfile name="local">
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder> <encoder>
...@@ -8,7 +10,7 @@ ...@@ -8,7 +10,7 @@
<charset>utf8</charset> <charset>utf8</charset>
</encoder> </encoder>
</appender> </appender>
<root level="DEBUG"> <root level="info">
<appender-ref ref="CONSOLE"/> <appender-ref ref="CONSOLE"/>
</root> </root>
</springProfile> </springProfile>
...@@ -28,7 +30,7 @@ ...@@ -28,7 +30,7 @@
</encoder> </encoder>
</appender> </appender>
<root level="debug"> <root level="info">
<appender-ref ref="stdout"/> <appender-ref ref="stdout"/>
</root> </root>
</springProfile> </springProfile>
......
...@@ -66,7 +66,7 @@ public class SubscriberApi { ...@@ -66,7 +66,7 @@ public class SubscriberApi {
@PreAuthorize("@authorizationFilter.hasAnyPermission('" + ServiceRole.OPS + "', '" + ServiceRole.ADMIN + "', '" + ServiceRole.EDITOR + "')") @PreAuthorize("@authorizationFilter.hasAnyPermission('" + ServiceRole.OPS + "', '" + ServiceRole.ADMIN + "', '" + ServiceRole.EDITOR + "')")
public ResponseEntity<Subscription> createSubscription(@RequestBody @Valid Subscription input) throws Exception { public ResponseEntity<Subscription> createSubscription(@RequestBody @Valid Subscription input) throws Exception {
input = createSubscription.get().run(input); 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); return new ResponseEntity<>(input, HttpStatus.CREATED);
} }
...@@ -81,7 +81,7 @@ public class SubscriberApi { ...@@ -81,7 +81,7 @@ public class SubscriberApi {
@PreAuthorize("@authorizationFilter.hasAnyPermission('" + ServiceRole.OPS + "', '" + ServiceRole.ADMIN + "', '" + ServiceRole.EDITOR + "')") @PreAuthorize("@authorizationFilter.hasAnyPermission('" + ServiceRole.OPS + "', '" + ServiceRole.ADMIN + "', '" + ServiceRole.EDITOR + "')")
public ResponseEntity<SubscriptionInfo> getSubscription(@PathVariable("id") @NotBlank String id) { public ResponseEntity<SubscriptionInfo> getSubscription(@PathVariable("id") @NotBlank String id) {
Subscription output = subscriptionRepository.get().get(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); 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