Skip to content

Commit

Permalink
Update logger demo with new parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
claudiospizzi committed Feb 1, 2016
1 parent fdd6181 commit 21e2d8f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Examples/LoggerDemo.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
# Initialize the logger with default values
Start-ScriptLogger

# Alternative: Specify all possible parameters for the logger
Start-ScriptLogger -Path 'C:\Temp\test.log' -Format '{0:yyyy-MM-dd} {0:HH:mm:ss} {1} {2} {3,-11} {4}' -Level 'Verbose' -SkipEventLog -HideConsoleOutput
# Alternative: Specify all possible parameters for the logger. Of course, this
# will not log anything, if you disable the log file, the event log and the
# console output at the same time.
Start-ScriptLogger -Path 'C:\Temp\test.log' -Format '{0:yyyy-MM-dd} {0:HH:mm:ss} {1} {2} {3,-11} {4}' -Level 'Verbose' -NoLogFile -NoEventLog -NoConsoleOutput

# Log an error message
Write-ErrorLog -Message 'My Error Message'
Expand Down

0 comments on commit 21e2d8f

Please sign in to comment.