-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
chao
committed
Sep 12, 2022
1 parent
e75350c
commit ce137db
Showing
3 changed files
with
57 additions
and
18 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
using SuperUtils.Framework.Logger; | ||
using SuperUtils.IO; | ||
using System; | ||
using System.IO; | ||
|
||
namespace SuperCom.Log | ||
{ | ||
public class Logger : AbstractLogger | ||
{ | ||
public static string FilePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "app.log"); | ||
private Logger() { } | ||
|
||
public static Logger Instance { get; } | ||
|
||
static Logger() | ||
{ | ||
Instance = new Logger(); | ||
} | ||
|
||
public override void LogPrint(string str) | ||
{ | ||
Console.WriteLine(str); | ||
FileHelper.TryAppendToFile(FilePath, str); | ||
} | ||
} | ||
} |
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