Skip to content

Commit 2a22e95

Browse files
authored
Merge pull request #3403 from dotnet/master
Update live with current master
2 parents 9058026 + c4926a0 commit 2a22e95

File tree

4 files changed

+19
-15
lines changed

4 files changed

+19
-15
lines changed

xml/Microsoft.VisualBasic.Logging/FileLogTraceListener.xml

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -227,21 +227,26 @@
227227
<ReturnType>System.Boolean</ReturnType>
228228
</ReturnValue>
229229
<Docs>
230-
<summary>Determines whether to append the output to the current file or write it to a new file.</summary>
230+
<summary>Determines whether to append the output to the current file or write it to a new or existing file.</summary>
231231
<value>
232232
<see langword="Boolean" />, with <see langword="True" /> indicating that the output is appended to the current file, and <see langword="False" /> indicating that output is written to a new file. The default setting for this property is <see langword="True" />.</value>
233233
<remarks>
234234
<format type="text/markdown"><![CDATA[
235-
235+
236236
## Remarks
237-
When the <xref:Microsoft.VisualBasic.Logging.FileLogTraceListener.Append%2A> property is `False`, the output is written to a new file. When the property is `True`, the output is appended to the current file, unless:
238-
239-
- The output file is locked by another process. In this situation, a new log file is created with a version number that is incorporated into the <xref:Microsoft.VisualBasic.Logging.FileLogTraceListener.FullLogFileName%2A> name.
240-
241-
- The current file size is greater than what the <xref:Microsoft.VisualBasic.Logging.FileLogTraceListener.MaxFileSize%2A> property allows. In this situation, additional messages are discarded and, depending on the <xref:Microsoft.VisualBasic.Logging.FileLogTraceListener.DiskSpaceExhaustedBehavior%2A> property, an exception is thrown.
242-
243-
- The existing file name is out of date according to the log-creation schedule specified by the <xref:Microsoft.VisualBasic.Logging.FileLogTraceListener.LogFileCreationSchedule%2A> property. In this situation, a new log file is created and the date stamp is incorporated into the <xref:Microsoft.VisualBasic.Logging.FileLogTraceListener.FullLogFileName%2A> name.
244-
237+
238+
When the <xref:Microsoft.VisualBasic.Logging.FileLogTraceListener.Append%2A> property is `True`, the log file is opened in <xref:System.IO.FileMode.Append> mode, to keep existing logs. The current writing position starts at the end of the file, so that any new logs are appended to the end of the file.
239+
240+
When the `Append` property is `False`, the log file is opened in <xref:System.IO.FileMode.Truncate> mode, where all log data is deleted when the log file is opened. The `FileLogTraceListener` deletes existing contents of the log file once after the `Append` propery is set to `False` or the file is opened and before it writes the first log. After that, `FileLogTraceListener` appends additional trace data to the end of the file. If the `FileLogTraceListener` instance is closed and then reopened while Append is set to False, it erases the log file data before writing additional logs. This can lead to missing data, particularly if you set the value of the `Append` property to `False` in a configuration file.
241+
242+
This behavior is overridden in the following scenarios:
243+
244+
- The output file is locked by another process. A new log file is created with a version number that is incorporated into the <xref:Microsoft.VisualBasic.Logging.FileLogTraceListener.FullLogFileName%2A> name.
245+
246+
- The current file size is greater than what the <xref:Microsoft.VisualBasic.Logging.FileLogTraceListener.MaxFileSize%2A> property allows. Additional messages are discarded. Depending on the <xref:Microsoft.VisualBasic.Logging.FileLogTraceListener.DiskSpaceExhaustedBehavior%2A> property, an exception is thrown.
247+
248+
- The existing file name is out of date according to the log-creation schedule specified by the <xref:Microsoft.VisualBasic.Logging.FileLogTraceListener.LogFileCreationSchedule%2A> property. A new log file is created. The date stamp is incorporated into the <xref:Microsoft.VisualBasic.Logging.FileLogTraceListener.FullLogFileName%2A> name.
249+
245250
]]></format>
246251
</remarks>
247252
<altmember cref="P:Microsoft.VisualBasic.Logging.FileLogTraceListener.MaxFileSize" />

xml/System.Net/HttpListenerResponse.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1171,8 +1171,8 @@
11711171
## Examples
11721172
The following code example demonstrates setting the value of this property.
11731173
1174-
[!code-csharp[Net_Listener_Basic#7](~/samples/snippets/csharp/VS_Snippets_Remoting/Net_Listener_Basic/CS/test.cs#7)]
1175-
[!code-vb[Net_Listener_Basic#7](~/samples/snippets/visualbasic/VS_Snippets_Remoting/Net_Listener_Basic/VB/test.vb#7)]
1174+
[!code-csharp[NclListener#7](~/samples/snippets/csharp/VS_Snippets_Remoting/NCLListener/CS/sample.cs#7)]
1175+
[!code-vb[NclListener#7](~/samples/snippets/visualbasic/VS_Snippets_Remoting/NCLListener/vb/sample.vb#7)]
11761176
11771177
]]></format>
11781178
</remarks>

xml/System.Reflection.PortableExecutable/PEHeader.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -492,8 +492,7 @@ Represents `IMAGE_DIRECTORY_ENTRY_EXPORT`.
492492
<Docs>
493493
<summary>Gets the alignment factor (in bytes) that is used to align the raw data of sections in the image file.</summary>
494494
<value>A power of 2 between 512 and 64K, inclusive. The default is 512.</value>
495-
<remarks><format type="text/markdown">
496-
<![CDATA[
495+
<remarks><format type="text/markdown"><![CDATA[
497496
498497
## Remarks
499498

xml/System.Xml.Linq/XComment.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,7 @@ This is a comment
381381
<param name="writer">The writer to write this <see cref="T:System.Xml.Linq.XComment" /> to.</param>
382382
<param name="cancellationToken">A token that can be used to request cancellation of the asynchronous operation.</param>
383383
<summary>Writes this <see cref="T:System.Xml.Linq.XComment" /> to the specified <see cref="T:System.Xml.XmlWriter" />.</summary>
384-
<returns>To be added.</returns>
384+
<returns>A task that represents the asynchronous write operation.</returns>
385385
<remarks>To be added.</remarks>
386386
</Docs>
387387
</Member>

0 commit comments

Comments
 (0)