Created
May 6, 2023 18:16
-
-
Save sjehutch/cee47635eecb2307401a5e04c02c3f06 to your computer and use it in GitHub Desktop.
C# Logging - Move this to a service
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
public void Log(string message, [CallerMemberName] string memberName = "", [CallerFilePath] string filePath = "", [CallerLineNumber] int lineNumber = 0) | |
{ | |
Console.WriteLine($"[{memberName}({lineNumber}) in {filePath}]: {message}"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment