Skip to content

Commit 9627229

Browse files
committed
Updated based on review comments
1 parent ce73d20 commit 9627229

2 files changed

Lines changed: 12 additions & 2 deletions

File tree

README.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ parameter to the decorator like @profile(stream=fp)
244244

245245
For details refer: examples/reporting_file.py
246246

247-
Reporting via logger Module:
247+
``Reporting via logger Module:``
248248

249249
Sometime it would be very convenient to use logger module specially
250250
when we need to use RotatingFileHandler.
@@ -256,7 +256,7 @@ LogFile of memory profiler module.
256256
>>> import sys
257257
>>> sys.stdout = LogFile('memory_profile_log')
258258

259-
Customised reporting:
259+
``Customised reporting:``
260260

261261
Sending everything to the log file while running the memory_profiler
262262
could be cumbersome and one can choose only entries with increments
@@ -389,6 +389,8 @@ cleanup.
389389

390390
`Thomas Kluyver <https://github.com/takluyver>`_ added the IPython extension.
391391

392+
`Sagar UDAY KUMAR <https://github.com/sagaru>`_ added Report generation feature and examples.
393+
392394

393395
=========
394396
License

memory_profiler.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -813,6 +813,14 @@ class LogFile(object):
813813
"""File-like object to log text using the `logging` module and the log report can be customised."""
814814

815815
def __init__(self, name=None, reportIncrementFlag=False):
816+
"""
817+
:param name: name of the logger module
818+
reportIncrementFlag: This must be set to True if only the steps with memory increments are to be reported
819+
820+
:type self: object
821+
name: string
822+
reportIncrementFlag: bool
823+
"""
816824
self.logger = logging.getLogger(name)
817825
self.reportIncrementFlag = reportIncrementFlag
818826

0 commit comments

Comments
 (0)