forked from JordannDev/VATSIM-Notify
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a new PrintStream for improving the log
- Loading branch information
Showing
2 changed files
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package ml.jordie.vatsimnotify.logger; | ||
|
||
import java.io.OutputStream; | ||
import java.io.PrintStream; | ||
import java.util.Date; | ||
|
||
public class LogPrintStream extends PrintStream { | ||
public LogPrintStream(OutputStream out) { | ||
super(out); | ||
} | ||
|
||
@Override | ||
public void println(String string) { | ||
Date date = new Date(); | ||
super.println("[" + date.toString() + "] " + string); | ||
} | ||
} |