Authored by wangshusheng

Merge branch 'master' into test6.9.7

... ... @@ -414,11 +414,11 @@ public class ClickUnionRest implements ApplicationEventPublisherAware{
clickUnion.info("addMonitor with param is {}", bo);
try {
Enumeration<String> e = request.getParameterNames();
while (e.hasMoreElements()) {
String key = e.nextElement();
clickUnion.info("addMonitor with key={}, value={}", key, request.getParameter(key));
}
// Enumeration<String> e = request.getParameterNames();
// while (e.hasMoreElements()) {
// String key = e.nextElement();
// clickUnion.info("addMonitor with key={}, value={}", key, request.getParameter(key));
// }
String IP = RemoteIPInterceptor.getRemoteIP();
String clientIp = null;
if(StringUtils.isNotEmpty(IP)){
... ... @@ -428,7 +428,7 @@ public class ClickUnionRest implements ApplicationEventPublisherAware{
bo.setClientIp(clientIp);
String agent = request.getHeader("user-agent");
clickUnion.info("addMonitor user-agent={}", agent);
// clickUnion.info("addMonitor user-agent={}", agent);
try{
if (!StringUtils.isEmpty(agent)) {
if (agent.toLowerCase().indexOf("mac os x") >= 0 || agent.toLowerCase().indexOf("iphone") >= 0) {
... ... @@ -475,7 +475,7 @@ public class ClickUnionRest implements ApplicationEventPublisherAware{
bo = service.clickHttpRequestTOBO(request,bo);
}
unionService.clickUnion(bo);
clickUnion.info("addMonitor with param is {}", bo);
// clickUnion.info("addMonitor with param is {}", bo);
// log.info("addMonitor with result is {}, and request is {}", response, bo);
response.setStatus(200);
JSONObject j = new JSONObject();
... ...
... ... @@ -456,7 +456,7 @@ public class UnionServiceImpl implements IUnionService, IBusinessExportService,
// 如果redis中不存在存在该用户点击信息,则退出
if (StringUtils.isEmpty(value)) {
log.warn("activateUnion error user not click info. with param is {}", request);
log.info("activateUnion error user not click info. with param is {}", request);
return new UnionResponse(200, "user not click",new JSONObject());
}
... ...
... ... @@ -191,6 +191,17 @@
</encoder>
</appender>
<appender name="CLICK_UNION-ASYNC" class= "ch.qos.logback.classic.AsyncAppender">
<!-- 不丢失日志.默认的,如果队列的80%已满,则会丢弃TRACT、DEBUG、INFO级别的日志 -->
<discardingThreshold >0</discardingThreshold>
<queueSize>3000</queueSize>
<neverBlock>true</neverBlock>
<includeCallerData>true</includeCallerData>
<maxFlushTime>3000</maxFlushTime>
<!-- 添加附加的appender,最多只能添加一个 -->
<appender-ref ref ="CLICK_UNION"/>
</appender>
<!-- 激活顶当日志 appender -->
<appender name="ACTIVE_UNION" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${yoho.logs.basedir}/${yoho.unions.env.namespace}/ACTIVE_UNION.log</file>
... ... @@ -209,6 +220,17 @@
</encoder>
</appender>
<appender name="ACTIVE_UNION-ASYNC" class= "ch.qos.logback.classic.AsyncAppender">
<!-- 不丢失日志.默认的,如果队列的80%已满,则会丢弃TRACT、DEBUG、INFO级别的日志 -->
<discardingThreshold >0</discardingThreshold>
<queueSize>3000</queueSize>
<neverBlock>true</neverBlock>
<includeCallerData>true</includeCallerData>
<maxFlushTime>3000</maxFlushTime>
<!-- 添加附加的appender,最多只能添加一个 -->
<appender-ref ref ="ACTIVE_UNION"/>
</appender>
<appender name="IP_MATCH" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${yoho.logs.basedir}/${yoho.unions.env.namespace}/IP_MATCH.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
... ... @@ -378,11 +400,11 @@
<!-- 激活顶当时的日志 appender -->
<logger name="clickUnion" level="INFO" additivity="false">
<appender-ref ref="CLICK_UNION" />
<appender-ref ref="CLICK_UNION-ASYNC" />
</logger>
<logger name="activeUnion" level="INFO" additivity="false">
<appender-ref ref="ACTIVE_UNION"/>
<appender-ref ref="ACTIVE_UNION-ASYNC"/>
</logger>
<logger name="ipMatch" level="INFO" additivity="false">
... ...