Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
熊鹏飞
/
xxljob220
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
cf1768d2
authored
May 30, 2018
by
xuxueli
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'master' of
https://github.com/xuxueli/xxl-job
parents
310c7c5b
df613f16
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
6 deletions
doc/XXL-JOB官方文档.md
xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
xxl-job-core/src/main/java/com/xxl/job/core/util/ScriptUtil.java
doc/XXL-JOB官方文档.md
View file @
cf1768d2
## 《分
布式任务调度平台XXL-JOB》
## 《分
布式任务调度平台XXL-JOB》
...
...
@@ -1212,6 +1212,7 @@ Tips: 历史版本(V1.3.x)目前已经Release至稳定版本, 进入维护阶段
-
11、任务回调结果优化,支持展示在Rolling log中,方便问题排查;
-
12、脚本任务异常Log输出优化;
-
13、任务线程停止变量修饰符优化;
-
14、脚本任务Log文件流关闭优化;
### TODO LIST
...
...
xxl-job-core/src/main/java/com/xxl/job/core/log/XxlJobFileAppender.java
View file @
cf1768d2
...
...
@@ -115,12 +115,13 @@ public class XxlJobFileAppender {
appendLog
+=
"\r\n"
;
// append file content
try
{
FileOutputStream
fos
=
null
;
try
{
fos
=
new
FileOutputStream
(
logFile
,
true
);
fos
.
write
(
appendLog
.
getBytes
(
"utf-8"
));
fos
.
flush
();
}
catch
(
Exception
e
)
{
logger
.
error
(
e
.
getMessage
(),
e
);
}
finally
{
if
(
fos
!=
null
)
{
try
{
...
...
@@ -130,9 +131,6 @@ public class XxlJobFileAppender {
}
}
}
}
catch
(
Exception
e
)
{
logger
.
error
(
e
.
getMessage
(),
e
);
}
}
...
...
xxl-job-core/src/main/java/com/xxl/job/core/util/ScriptUtil.java
View file @
cf1768d2
...
...
@@ -60,7 +60,10 @@ public class ScriptUtil {
// 标准输出:print (null if watchdog timeout)
// 错误输出:logging + 异常 (still exists if watchdog timeout)
// 标准输入
try
(
FileOutputStream
fileOutputStream
=
new
FileOutputStream
(
logFile
,
true
))
{
FileOutputStream
fileOutputStream
=
null
;
//
try
{
fileOutputStream
=
new
FileOutputStream
(
logFile
,
true
);
PumpStreamHandler
streamHandler
=
new
PumpStreamHandler
(
fileOutputStream
,
fileOutputStream
,
null
);
// command
...
...
@@ -79,6 +82,15 @@ public class ScriptUtil {
}
catch
(
Exception
e
)
{
XxlJobLogger
.
log
(
e
);
return
-
1
;
}
finally
{
if
(
fileOutputStream
!=
null
)
{
try
{
fileOutputStream
.
close
();
}
catch
(
IOException
e
)
{
XxlJobLogger
.
log
(
e
);
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment