Skip to content

Commit

Permalink
Merge pull request #136 from zhangbin1010/dev
Browse files Browse the repository at this point in the history
[Upgrade] 优化 log-server 代码
  • Loading branch information
zhangbinhub authored Dec 2, 2019
2 parents b9a27bb + 9e898a2 commit 2946abb
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ constructor(private val logAdapter: LogAdapter, private val logServerCustomerCon
if (!logFold.exists() || !logFold.isDirectory) {
throw ServerException("路径 $logFoldPath 不存在或不是文件夹")
}
val files = logFold.listFiles { pathname -> pathname.name.contains(logFileDate) }
val files = logFold.listFiles { pathname -> pathname.name.contains(logFileDate) && !pathname.name.endsWith(".tmp", true) }
if (files != null && files.isNotEmpty()) {
logAdapter.info(logFoldPath + " 路径下 " + logFileDate + " 的日志文件(或文件夹)共 " + files.size + "")
val fileNames: MutableList<String> = mutableListOf()
Expand Down

0 comments on commit 2946abb

Please sign in to comment.