-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Makes date/time format parameterized #4
Makes date/time format parameterized #4
Conversation
LogFile.cs
Outdated
@@ -65,7 +71,7 @@ public override void WriteDebug(string message) | |||
CheckDirectory(); | |||
if (message != String.Empty) | |||
{ | |||
message = String.Format("{0,-29} - [D] {1}", DateTime.UtcNow.ToString(DateTimeFormat), message); | |||
message = String.Format("{0,-18} - [D] {1}", DateTime.UtcNow.ToString(DateTimeFormat), message); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why change the formatting here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Dave! I changed it back to its original value. I was just doing some testing back then. Thanks!
LogFile.cs
Outdated
@@ -11,21 +11,25 @@ public class LogFile : HostIOSubscriberBase | |||
{ | |||
#region Fields | |||
|
|||
private const string DateTimeFormat = "r"; | |||
//private string DateTimeFormat = "dd-MMM-yyyy - HH:mm:ss"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No reason to leave a commented line of code around
v1.3.0 with this PR has been published to the PowerShell Gallery, and in a GitHub release. Thanks! :) |
Adds -DateTimeFormat parameter to Enable-Logfile