en-US/CMLogger-help.xml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<?xml version="1.0" encoding="utf-8"?>
<helpItems schema="maml">
 
<command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp">
<command:details><command:name>Write-CmLogFile</command:name>
<command:verb>Write</command:verb>
<command:noun>CmLogFile</command:noun>
<maml:description><maml:para>Write CMTrace formated messages to the log file
</maml:para>
</maml:description>
</command:details>
<maml:description><maml:para>Appends a new line to the log file with the message provided in the parameters and formats the log entry in CMTrace readable format
</maml:para>
</maml:description>
<command:syntax><command:syntaxItem><maml:name>Write-CmLogFile</maml:name>
<command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"><maml:name>LogFile</maml:name>
<maml:Description><maml:para>Mandatory. Specifies the path to the log file that will be updated.
</maml:para>
</maml:Description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
<dev:type><maml:name>String</maml:name>
<maml:uri /></dev:type>
<dev:defaultValue>None</dev:defaultValue>
</command:parameter>
<command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="2" aliases="none"><maml:name>Message</maml:name>
<maml:Description><maml:para>Mandatory. Specifies the string that will be written to the log file.
</maml:para>
</maml:Description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
<dev:type><maml:name>String</maml:name>
<maml:uri /></dev:type>
<dev:defaultValue>None</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"><maml:name>LogLevel</maml:name>
<maml:Description><maml:para>Optional. Specifies the severity level of the message, this defaults to Informational if not specified.
</maml:para>
</maml:Description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
<dev:type><maml:name>String</maml:name>
<maml:uri /></dev:type>
<dev:defaultValue>None</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"><maml:name>Clobber</maml:name>
<maml:Description><maml:para>Optional. Changes the default function to overwrite an existing file instead of appending to it.
</maml:para>
</maml:Description>
<dev:type><maml:name>SwitchParameter</maml:name>
<maml:uri /></dev:type>
<dev:defaultValue>False</dev:defaultValue>
</command:parameter>
</command:syntaxItem>
</command:syntax>
<command:parameters><command:parameter required="true" variableLength="true" globbing="false" pipelineInput="False" position="1" aliases="none"><maml:name>LogFile</maml:name>
<maml:Description><maml:para>Mandatory. Specifies the path to the log file that will be updated.
</maml:para>
</maml:Description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
<dev:type><maml:name>String</maml:name>
<maml:uri /></dev:type>
<dev:defaultValue>None</dev:defaultValue>
</command:parameter>
<command:parameter required="true" variableLength="true" globbing="false" pipelineInput="True (ByValue)" position="2" aliases="none"><maml:name>Message</maml:name>
<maml:Description><maml:para>Mandatory. Specifies the string that will be written to the log file.
</maml:para>
</maml:Description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
<dev:type><maml:name>String</maml:name>
<maml:uri /></dev:type>
<dev:defaultValue>None</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"><maml:name>LogLevel</maml:name>
<maml:Description><maml:para>Optional. Specifies the severity level of the message, this defaults to Informational if not specified.
</maml:para>
</maml:Description>
<command:parameterValue required="true" variableLength="false">String</command:parameterValue>
<dev:type><maml:name>String</maml:name>
<maml:uri /></dev:type>
<dev:defaultValue>None</dev:defaultValue>
</command:parameter>
<command:parameter required="false" variableLength="true" globbing="false" pipelineInput="False" position="named" aliases="none"><maml:name>Clobber</maml:name>
<maml:Description><maml:para>Optional. Changes the default function to overwrite an existing file instead of appending to it.
</maml:para>
</maml:Description>
<command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue>
<dev:type><maml:name>SwitchParameter</maml:name>
<maml:uri /></dev:type>
<dev:defaultValue>False</dev:defaultValue>
</command:parameter>
</command:parameters>
<command:inputTypes></command:inputTypes>
<command:returnValues></command:returnValues>
<maml:alertSet><maml:alert><maml:para>Author: Trent Willingham Check out my other scripts and projects @ https://github.com/twillin912
</maml:para>
</maml:alert>
</maml:alertSet>
<command:examples><command:example><maml:title>-------------------------- EXAMPLE 1 --------------------------</maml:title>
<dev:code>Write-CmLogFile -LogFile 'C:\Logs\MyLog.log' -Message "This is an informational message"</dev:code>
<dev:remarks><maml:para>Writes a informational message to a new line in the log file 'C:\Logs\MyLog.log'.
</maml:para>
</dev:remarks>
</command:example>
<command:example><maml:title>-------------------------- EXAMPLE 2 --------------------------</maml:title>
<dev:code>Write-CmLogFile -LogFile $LogFile -Message "This is an error message" -LogLevel Error</dev:code>
<dev:remarks><maml:para>Writes an error message to a new line in the log file specified in the $LogFile variable.
</maml:para>
</dev:remarks>
</command:example>
<command:example><maml:title>-------------------------- EXAMPLE 3 --------------------------</maml:title>
<dev:code>Write-CmLogFile -LogFile $LogFile -Message "This is an error message" -LogLevel Error -Clobber</dev:code>
<dev:remarks><maml:para>Writes an error message to a new file, overwritting any existing file specified in the $LogFile variable.
</maml:para>
</dev:remarks>
</command:example>
</command:examples>
<command:relatedLinks><maml:navigationLink><maml:linkText>https://cmlogger.readthedocs.io/en/latest/en-US/Write-CmLogFile</maml:linkText>
<maml:uri>https://cmlogger.readthedocs.io/en/latest/en-US/Write-CmLogFile</maml:uri>
</maml:navigationLink>
</command:relatedLinks>
</command:command>
</helpItems>