Skip to content

Commit

Permalink
增加注释
Browse files Browse the repository at this point in the history
  • Loading branch information
fengzhizi715 committed Oct 8, 2020
1 parent 6532b72 commit f53405a
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import java.io.IOException
* com.safframework.log.printer.file.FileWriter
* @author: Tony Shen
* @date: 2019-11-04 17:11
* @version: V2.0 文件写入
* @since: V2.0 文件写入
*/
class FileWriter(var folderPath:String) {

Expand All @@ -28,7 +28,6 @@ class FileWriter(var folderPath:String) {

fun open(newFileName: String): Boolean {

// lastFileName = newFileName
file = File(folderPath, newFileName)
lastFileName = file?.absolutePath

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import com.safframework.log.LogLevel
* com.safframework.log.printer.file.bean.LogItem
* @author: Tony Shen
* @date: 2019-11-04 17:09
* @version: V2.0 每次写入文件的内容,记录了当前时间、LogLevel、tag、msg
* @since: V2.0 每次写入文件的内容,记录了当前时间、LogLevel、tag、msg
*/
class LogItem(var time: String, var level: LogLevel, var tag: String, var msg: String) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import java.util.*
* com.safframework.log.printer.file.name.DateWithHourFileNameGenerator
* @author: Tony Shen
* @date: 2020-01-04 00:17
* @version: V2.4 <描述当前版本功能>
* @since: V2.4 每隔一定的小时数对日志进行分片
*/
class DateWithHourFileNameGenerator(val divider:Int) : FileNameGenerator {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import java.util.concurrent.atomic.AtomicLong
* com.safframework.log.printer.file.name.LengthFileNameGenerator
* @author: Tony Shen
* @date: 2020-07-29 10:44
* @version: V2.5 基于文件大小生成文件(默认情况下,超过1M会对日志进行分片)
* @since: V2.5 基于文件大小生成文件(默认情况下,超过1M会对日志进行分片)
*/
class LengthFileNameGenerator(val prefix:String, val length:Long = 1024*1024) : FileNameGenerator {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package com.safframework.log.printer.file.name
* com.safframework.log.printer.file.name.TagFileNameGenerator
* @author: Tony Shen
* @date: 2019-11-06 01:56
* @version: V2.2 <描述当前版本功能>
* @since: V2.2 通过 tag 生成对应的日志文件
*/
class TagFileNameGenerator : FileNameGenerator {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import java.util.zip.ZipOutputStream
* com.safframework.log.printer.file.zip.Compress
* @author: Tony Shen
* @date: 2019-11-17 10:46
* @version: V2.2 <描述当前版本功能>
* @since: V2.2 对日志进行压缩打包成 zip 文件
*/
private const val BUFFER_SIZE = 4096

Expand Down

0 comments on commit f53405a

Please sign in to comment.