Commit 529cb9d27f787d43f0bd4bc192f356bd7d596953
1 parent
51428512
no message
Showing
6 changed files
with
29 additions
and
6 deletions
.settings/org.eclipse.wst.common.component
| ... | ... | @@ -8,6 +8,9 @@ |
| 8 | 8 | <dependent-module archiveName="cnlive_live_model-0.0.1-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/cnlive_live_model/cnlive_live_model"> |
| 9 | 9 | <dependency-type>uses</dependency-type> |
| 10 | 10 | </dependent-module> |
| 11 | + <dependent-module archiveName="cnlive_ks3-1.0-SNAPSHOT.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/cnlive_ks3/cnlive_ks3"> | |
| 12 | + <dependency-type>uses</dependency-type> | |
| 13 | + </dependent-module> | |
| 11 | 14 | <dependent-module archiveName="smart-framework-4.0.1.jar" deploy-path="/WEB-INF/lib" handle="module:/resource/smart-framework/smart-framework"> |
| 12 | 15 | <dependency-type>uses</dependency-type> |
| 13 | 16 | </dependent-module> | ... | ... |
src/main/java/com/cnlive/mz/live/action/VideoAction.java
| ... | ... | @@ -177,13 +177,13 @@ public class VideoAction { |
| 177 | 177 | String video_type = params.getString("video_type"); |
| 178 | 178 | String state = params.getString("state"); |
| 179 | 179 | String duration = params.getString("duration"); |
| 180 | - xLog("uploadNotify", "duration", duration, video_type, video_type,state); | |
| 180 | + xLog("uploadNotify", "duration", duration, video_type, video_type, state); | |
| 181 | 181 | if (video_type.equals("2")) { |
| 182 | 182 | // 点播通知 |
| 183 | 183 | tVideoService.notify(video_uuid); |
| 184 | 184 | } else if (video_type.equals("3")) { |
| 185 | 185 | // 直播正常结束 |
| 186 | - tLiveService.notify(video_uuid, duration, 2); | |
| 186 | + tLiveService.notify(video_uuid, 2); | |
| 187 | 187 | } |
| 188 | 188 | ApiBean apiBean = new ApiBean(); |
| 189 | 189 | apiBean.setCode(100); |
| ... | ... | @@ -194,7 +194,7 @@ public class VideoAction { |
| 194 | 194 | @Request.Get("/api/video/error/{video_uuid}") |
| 195 | 195 | public ApiBean error(String video_uuid) { |
| 196 | 196 | // 直播异常结束 |
| 197 | - tLiveService.notify(video_uuid, "-1", -2); | |
| 197 | + tLiveService.notify(video_uuid, -2); | |
| 198 | 198 | ApiBean apiBean = new ApiBean(); |
| 199 | 199 | apiBean.setCode(100); |
| 200 | 200 | apiBean.setMessage("请求成功"); |
| ... | ... | @@ -217,7 +217,7 @@ public class VideoAction { |
| 217 | 217 | private void xLog(String... str) { |
| 218 | 218 | StringBuffer sb = new StringBuffer(); |
| 219 | 219 | for (int i = 0; i < str.length; i++) { |
| 220 | - sb.append(str); | |
| 220 | + sb.append(str[i]); | |
| 221 | 221 | sb.append("|"); |
| 222 | 222 | } |
| 223 | 223 | log.info(sb.toString()); | ... | ... |
src/main/resources/log4j.properties
| 1 | 1 | log4j.rootLogger=INFO,console,file |
| 2 | 2 | log4j.logger.content=INFO,content |
| 3 | 3 | log4j.logger.video=INFO,video |
| 4 | +log4j.logger.action=INFO,action | |
| 4 | 5 | log4j.appender.console=org.apache.log4j.ConsoleAppender |
| 5 | 6 | log4j.appender.console.Target=System.out |
| 6 | 7 | log4j.appender.console.layout=org.apache.log4j.PatternLayout |
| ... | ... | @@ -17,6 +18,14 @@ log4j.appender.file.layout.ConversionPattern=%d{HH:mm:ss,SSS} %p %c (%L) - %m%n |
| 17 | 18 | log4j.logger.org.smart4j=DEBUG |
| 18 | 19 | |
| 19 | 20 | |
| 21 | +#action | |
| 22 | +log4j.appender.action=org.apache.log4j.DailyRollingFileAppender | |
| 23 | +log4j.appender.action.File=${catalina.home}/logs/action.log | |
| 24 | +log4j.appender.action.layout=org.apache.log4j.PatternLayout | |
| 25 | +log4j.appender.action.layout.ConversionPattern=[%d{yyyy-MM-dd HH:mm:ss}] %5p [%t] %C{1} - %m%n | |
| 26 | +log4j.appender.action.DatePattern='.'yyyy-MM-dd | |
| 27 | +log4j.appender.action.Encoding=UTF-8 | |
| 28 | + | |
| 20 | 29 | #content |
| 21 | 30 | log4j.appender.content=org.apache.log4j.DailyRollingFileAppender |
| 22 | 31 | log4j.appender.content.File=${catalina.home}/logs/content.log |
| ... | ... | @@ -26,6 +35,7 @@ log4j.appender.content.DatePattern='.'yyyy-MM-dd |
| 26 | 35 | log4j.appender.content.Encoding=UTF-8 |
| 27 | 36 | |
| 28 | 37 | |
| 38 | + | |
| 29 | 39 | #video |
| 30 | 40 | log4j.appender.video=org.apache.log4j.DailyRollingFileAppender |
| 31 | 41 | log4j.appender.video.File=${catalina.home}/logs/video.log | ... | ... |
target/classes/log4j.properties
| 1 | 1 | log4j.rootLogger=INFO,console,file |
| 2 | 2 | log4j.logger.content=INFO,content |
| 3 | 3 | log4j.logger.video=INFO,video |
| 4 | +log4j.logger.action=INFO,action | |
| 4 | 5 | log4j.appender.console=org.apache.log4j.ConsoleAppender |
| 5 | 6 | log4j.appender.console.Target=System.out |
| 6 | 7 | log4j.appender.console.layout=org.apache.log4j.PatternLayout |
| ... | ... | @@ -17,6 +18,14 @@ log4j.appender.file.layout.ConversionPattern=%d{HH:mm:ss,SSS} %p %c (%L) - %m%n |
| 17 | 18 | log4j.logger.org.smart4j=DEBUG |
| 18 | 19 | |
| 19 | 20 | |
| 21 | +#action | |
| 22 | +log4j.appender.action=org.apache.log4j.DailyRollingFileAppender | |
| 23 | +log4j.appender.action.File=${catalina.home}/logs/action.log | |
| 24 | +log4j.appender.action.layout=org.apache.log4j.PatternLayout | |
| 25 | +log4j.appender.action.layout.ConversionPattern=[%d{yyyy-MM-dd HH:mm:ss}] %5p [%t] %C{1} - %m%n | |
| 26 | +log4j.appender.action.DatePattern='.'yyyy-MM-dd | |
| 27 | +log4j.appender.action.Encoding=UTF-8 | |
| 28 | + | |
| 20 | 29 | #content |
| 21 | 30 | log4j.appender.content=org.apache.log4j.DailyRollingFileAppender |
| 22 | 31 | log4j.appender.content.File=${catalina.home}/logs/content.log |
| ... | ... | @@ -26,6 +35,7 @@ log4j.appender.content.DatePattern='.'yyyy-MM-dd |
| 26 | 35 | log4j.appender.content.Encoding=UTF-8 |
| 27 | 36 | |
| 28 | 37 | |
| 38 | + | |
| 29 | 39 | #video |
| 30 | 40 | log4j.appender.video=org.apache.log4j.DailyRollingFileAppender |
| 31 | 41 | log4j.appender.video.File=${catalina.home}/logs/video.log | ... | ... |
target/m2e-wtp/web-resources/META-INF/MANIFEST.MF
target/m2e-wtp/web-resources/META-INF/maven/com.cnlive.mz.live.web/cnlive_live_web/pom.properties