Commit 1e1f20e2 authored by Jeremy C. Reed's avatar Jeremy C. Reed
Browse files

Fix a few typos or improve grammar for some comments or inline docs.


git-svn-id: svn://bind10.isc.org/svn/bind10/branches/trac176@2306 e5f2f494-b856-4b98-b285-d166d9295462
parent dcba62a4
...@@ -52,10 +52,10 @@ class NSFileLogHandler(logging.handlers.RotatingFileHandler): ...@@ -52,10 +52,10 @@ class NSFileLogHandler(logging.handlers.RotatingFileHandler):
If the log file is deleted at runtime, a new file will be created. If the log file is deleted at runtime, a new file will be created.
""" """
dfn = self.baseFilename dfn = self.baseFilename
if (self.stream) and (not os.path.exists(dfn)): #Is log file exist? if (self.stream) and (not os.path.exists(dfn)): #Does log file exist?
self.stream.close() self.stream.close()
dir = os.path.split(dfn) dir = os.path.split(dfn)
if not (os.path.exists(dir[0])): #Is log subdirectory exist? if not (os.path.exists(dir[0])): #Does log subdirectory exist?
os.makedirs(dir[0]) os.makedirs(dir[0])
self.stream = self._open() self.stream = self._open()
return super(NSFileLogHandler, self).shouldRollover(record) return super(NSFileLogHandler, self).shouldRollover(record)
...@@ -63,7 +63,7 @@ class NSFileLogHandler(logging.handlers.RotatingFileHandler): ...@@ -63,7 +63,7 @@ class NSFileLogHandler(logging.handlers.RotatingFileHandler):
def update_config(self, file_name, backup_count, max_bytes): def update_config(self, file_name, backup_count, max_bytes):
"""Update RotatingFileHandler configuration. """Update RotatingFileHandler configuration.
If the file path is not exist, we will use the old log file. If the file path does not exist, we will use the old log file.
input: input:
log file name log file name
max backup count max backup count
...@@ -153,7 +153,7 @@ class NSLogger(logging.getLoggerClass()): ...@@ -153,7 +153,7 @@ class NSLogger(logging.getLoggerClass()):
"""Add a rotate file handler. """Add a rotate file handler.
input: input:
log_file : the location of log file. Handler wouldn't be created log_file : the location of log file. Handler will not be created
if log_file='' if log_file=''
max_bytes : limit log growth max_bytes : limit log growth
backup_count : max backup count backup_count : max backup count
...@@ -205,7 +205,7 @@ class NSLogger(logging.getLoggerClass()): ...@@ -205,7 +205,7 @@ class NSLogger(logging.getLoggerClass()):
self._add_rotate_handler(log_file, backup_count, max_bytes) self._add_rotate_handler(log_file, backup_count, max_bytes)
def _get_config(self, config_data): def _get_config(self, config_data):
"""Get config data from module configration""" """Get config data from module configuration"""
log_file_str = config_data.get('log_file') log_file_str = config_data.get('log_file')
if(log_file_str): if(log_file_str):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment