Last active
July 6, 2021 10:39
-
-
Save Mahno74/2fc9f5ccf173a0fcbb16335585b533ff to your computer and use it in GitHub Desktop.
Logger
This file contains hidden or 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
using System.IO; | |
private void Log (string eventName) { | |
using (StreamWriter logger = new StreamWriter(path, true)) { | |
logger.WriteLine(DateTime.Now.ToLongTimeString() + "-" + eventName); | |
} | |
} | |
//или | |
private void Log (string eventName) { | |
using StreamWriter logger = new StreamWriter(path, true); logger.WriteLine(DateTime.Now.ToLongTimeString() + "-" + eventName); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment