Commit 3915bcd1 authored by Ghitha Dinan's avatar Ghitha Dinan

file fixing

parent 7c930679
package id.co.sangkuriang.inovasi.daerah.master.interceptor
import com.fasterxml.jackson.databind.DeserializationFeature
import com.fasterxml.jackson.databind.ObjectMapper
import id.co.sangkuriang.inovasi.daerah.master.model.response.ReturnData
import id.co.sangkuriang.inovasi.daerah.master.utility.getUsersLogin
......@@ -34,7 +35,7 @@ class LogInterceptor : Filter {
val responseArray = responseCacheWrapperObject.contentAsByteArray.toString(Charsets.UTF_8)
responseCacheWrapperObject.copyBodyToResponse()
writeLog(req, responseArray, response, time)
}
......@@ -64,9 +65,11 @@ class LogInterceptor : Filter {
}
}
val returnData: ReturnData? = null
var returnData: ReturnData? = null
try {
ObjectMapper().readValue(responseArray, ReturnData::class.java)
val objectMapper = ObjectMapper()
objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)
returnData = objectMapper.readValue(responseArray, ReturnData::class.java)
} catch (e: Exception) {
}
......
......@@ -5,30 +5,6 @@ See here for more details: http://gordondickens.com/wordpress/2013/03/27/sawing-
<property name="DEV_HOME" value="D://app-files//inovasi_daerah_master//log"/>
<!-- <property name="DEV_HOME" value="/home/inovasi-daerah/data/log/inovasi_daerah_master"/>-->
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%-5relative %-5level %logger{35} - %msg%n</pattern>
</encoder>
</appender>
<appender name="DEBUG-LOG" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${DEV_HOME}/debug.log</file>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<Pattern>
%d{yyyy-MM-dd HH:mm:ss} %-5level - %msg%n
</Pattern>
</encoder>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- rollover daily -->
<fileNamePattern>${DEV_HOME}/archived/debug.%d{yyyy-MM-dd}.%i.log
</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>10MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
</appender>
<appender name="ACCESS-LOG" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${DEV_HOME}/access.log</file>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
......@@ -47,11 +23,6 @@ See here for more details: http://gordondickens.com/wordpress/2013/03/27/sawing-
</rollingPolicy>
</appender>
<root level="debug">
<appender-ref ref="DEBUG-LOG"/>
<appender-ref ref="STDOUT"/>
</root>
<logger name="access.log" level="debug">
<appender-ref ref="ACCESS-LOG"/>
</logger>
......
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