[PATCH 5 of 5] loggingutil: document openlogfile()
Yuya Nishihara
yuya at tcha.org
Fri Nov 30 08:41:28 EST 2018
# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1542533731 -32400
# Sun Nov 18 18:35:31 2018 +0900
# Node ID cca1069915a9dd0521384d3c8d9d981b2092f237
# Parent 9868f09e72ad134557db7af35b642afc1130d4c3
loggingutil: document openlogfile()
This function will be used later for command-server logging.
diff --git a/mercurial/loggingutil.py b/mercurial/loggingutil.py
--- a/mercurial/loggingutil.py
+++ b/mercurial/loggingutil.py
@@ -15,6 +15,10 @@ from . import (
)
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)
More information about the Mercurial-devel
mailing list