You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-dev@logging.apache.org by ni...@apache.org on 2004/09/27 00:41:08 UTC
cvs commit: logging-log4net/src/Appender RollingFileAppender.cs
nicko 2004/09/26 15:41:08
Modified: src/Appender RollingFileAppender.cs
Log:
Updated doc comments. I have not been able to confirm the stuff on win32 file locking and sharing modes
Revision Changes Path
1.9 +19 -13 logging-log4net/src/Appender/RollingFileAppender.cs
Index: RollingFileAppender.cs
===================================================================
RCS file: /home/cvs/logging-log4net/src/Appender/RollingFileAppender.cs,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- RollingFileAppender.cs 18 Sep 2004 16:34:16 -0000 1.8
+++ RollingFileAppender.cs 26 Sep 2004 22:41:08 -0000 1.9
@@ -28,6 +28,19 @@
namespace log4net.Appender
{
+#if CONFIRM_WIN32_FILE_SHAREMODES
+ The following sounds good, and I though it was the case, but after
+ further testing on Windows I have not been able to confirm it.
+
+ /// On the Windows platform if another process has a write lock on the file
+ /// that is to be deleted, but allows shared read access to the file then the
+ /// file can be moved, but cannot be deleted. If the other process also allows
+ /// shared delete access to the file then the file will be deleted once that
+ /// process closes the file. If it is necessary to open the log file or any
+ /// of the backup files outside of this appender for either read or
+ /// write access please ensure that read and delete share modes are enabled.
+#endif
+
/// <summary>
/// Appender that rolls log files based on size or date or both.
/// </summary>
@@ -93,14 +106,7 @@
/// </para>
/// <para>
/// When rolling a backup file necessitates deleting an older backup file the
- /// file to be deleted is moved to a temporary name before being deleted.
- /// On the Windows platform if another process has a write lock on the file
- /// that is to be deleted, but allows shared read access to the file then the
- /// file can be moved, but cannot be deleted. If the other process also allows
- /// shared delete access to the file then the file will be deleted once that
- /// process closes the file. If it is necessary to open the log file or any
- /// of the backup files outside of this appender for either read or
- /// write access please ensure that read and delete share modes are enabled.
+ /// file to be deleted is moved to a temporary name before being deleted.
/// </para>
///
/// <note type="caution">
@@ -939,7 +945,7 @@
string fileToDelete = fileName;
// Try to move the file to temp name.
- // If the file is locked we should still be able to move it
+ // If the file is locked we may still be able to move it
string tempFileName = fileName + "." + Environment.TickCount + ".DeletePending";
try
{
@@ -1233,9 +1239,9 @@
public interface IDateTime
{
/// <summary>
- /// Gets the "current" time.
+ /// Gets the <i>current</i> time.
/// </summary>
- /// <value>The "current" time.</value>
+ /// <value>The <i>current</i> time.</value>
DateTime Now { get; }
}
@@ -1245,9 +1251,9 @@
private class DefaultDateTime : IDateTime
{
/// <summary>
- /// Gets the "current" time.
+ /// Gets the <b>current</b> time.
/// </summary>
- /// <value>The "current" time.</value>
+ /// <value>The <b>current</b> time.</value>
public DateTime Now
{
get { return DateTime.Now; }