Skip to content

Commit

Permalink
保存的log 加上毫秒值
Browse files Browse the repository at this point in the history
  • Loading branch information
SHMoriarty committed Sep 23, 2016
1 parent 32bdca2 commit c0b36ee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/src/main/java/cn/hadcn/log_example/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
VinciLog.init(LogLevel.DEBUG, "PENG", this);

VinciLog.startLogSave();
VinciLog.e("This is a test");
}
}
2 changes: 1 addition & 1 deletion log/src/main/java/cn/hadcn/davinci/log/VinciLog.java
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ protected static void appendLog(String text) {

try
{
SimpleDateFormat sdFormatter = new SimpleDateFormat("[MM-dd HH:mm:ss]", Locale.CHINA);
SimpleDateFormat sdFormatter = new SimpleDateFormat("[MM-dd HH:mm:ss:sss]", Locale.CHINA);
//BufferedWriter for performance, true to set append to file flag
BufferedWriter buf = new BufferedWriter(new FileWriter(logFile, true));
buf.append(sdFormatter.format(System.currentTimeMillis()));
Expand Down

0 comments on commit c0b36ee

Please sign in to comment.