Skip to content
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

Merged
merged 2 commits into from
Aug 24, 2017

Conversation

rbernardino
Copy link
Contributor

Adds -DateTimeFormat parameter to Enable-Logfile

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);
Copy link
Owner

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?

Copy link
Contributor Author

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";
Copy link
Owner

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

@dlwyatt dlwyatt merged commit 9d5d334 into dlwyatt:master Aug 24, 2017
@dlwyatt
Copy link
Owner

dlwyatt commented Aug 24, 2017

v1.3.0 with this PR has been published to the PowerShell Gallery, and in a GitHub release. Thanks! :)

@rbernardino rbernardino deleted the parameterized_datetimeformat branch August 25, 2017 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants