Skip to content

Commit

Permalink
Log 수정 #320
Browse files Browse the repository at this point in the history
  • Loading branch information
pahnjy01 committed Jan 9, 2017
1 parent 3416fa3 commit c842a4f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public String deviceExecute(String deviceId,String deviceCommand, String session
/**
* Device 제어 후 제어 결과가 Success면 Device Subscription 요청
*/
if(resultMessage.getCode().equals(ClientProfile.RESPONSE_SUCCESS_ONEM2MCODE) && false) {
if(resultMessage.getCode().equals(ClientProfile.RESPONSE_SUCCESS_ONEM2MCODE)) {
String subscriptionUri = device.getDeviceUri() + (ClientProfile.actionDeviceCommand(device.getDeviceUri()) ? ClientProfile.SI_CONTAINER_ACTION : ClientProfile.SI_CONTAINER_POWER) + ClientProfile.SI_CONTAINER_STATUS;
String response = deviceSubscription(subscriptionUri, deviceControlMessage.get_commandId());
logger.debug(LogPrint.LogMethodNamePrint() + " | Device Subscription : " + " , Device Uri = " + device.getDeviceUri() + " , Result : " + response + " , Session ID = " + sessionId);
Expand Down
20 changes: 10 additions & 10 deletions so-web/src/main/resources/logback-spring.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<include resource="org/springframework/boot/logging/logback/base.xml" />
<!-- ConsoleAppender Example -->
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<layout class="ch.qos.logback.classic.PatternLayout">
<pattern>%msg %n</pattern>
</layout>
<!-- encoders are assigned the type
ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
<encoder>
<pattern>[%d{yyyy-MM-dd HHmmss.SSS}] [%5level] [%16.16thread{15}] [%-35logger{35}] : %msg %n</pattern>
<!-- <pattern>%d{ISO8601} %5level [%15thread] %-35logger{35} : %msg %n</pattern> -->
</encoder>
</appender>

<!-- RollingFileAppender Example -->
<appender name="ROLLING" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>so-log.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- rollover daily -->SOLogger
<!-- rollover daily -->
<fileNamePattern>so-log-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy
class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
Expand All @@ -19,15 +24,10 @@
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<encoder>
<pattern>%msg %n</pattern>
<pattern>[%d{yyyy-MM-dd HHmmss.SSS}] [%5level] [%16.16thread{15}] [%-35logger{35}] : %msg %n</pattern>
</encoder>
</appender>


<logger name="com.pineone.icbms.so" level="DEBUG">
<appender-ref ref="ROLLING" />
</logger>
<root level="INFO">
<appender-ref ref="STDOUT" />
</root>
</configuration>

0 comments on commit c842a4f

Please sign in to comment.