changeset 40829:698477777883

loggingutil: document openlogfile() This function will be used later for command-server logging.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 18 Nov 2018 18:35:31 +0900
parents 03127e580980
children bad0053efaf6
files mercurial/loggingutil.py
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/loggingutil.py	Sun Nov 18 18:25:37 2018 +0900
+++ b/mercurial/loggingutil.py	Sun Nov 18 18:35:31 2018 +0900
@@ -15,6 +15,10 @@
 )
 
 def openlogfile(ui, vfs, name, maxfiles=0, maxsize=0):
+    """Open log file in append mode, with optional rotation
+
+    If maxsize > 0, the log file will be rotated up to maxfiles.
+    """
     def rotate(oldpath, newpath):
         try:
             vfs.unlink(newpath)