Skip to content

Commit

Permalink
readme
Browse files Browse the repository at this point in the history
  • Loading branch information
Adil Ansari committed Jun 9, 2015
1 parent 02ba23f commit 124f9f2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions README.rst
Expand Up @@ -41,6 +41,8 @@ Logger usage
my_logger.info('This is a test message')
``Logger raises exceptions``

Writer usage
-----------------

Expand All @@ -49,6 +51,17 @@ Writer usage
from scribe_logger.writer import ScribeWriter
writer = ScribeWriter('localhost', 1464, 'test_category')
try:
writer.write('test_message_1')
writer.write(['test_message_1', 'test_message_2', 'test_message_3'])
except ScribeLoggerError:
raise
Use __silent=True__ To suppress exceptions:

.. code:: python
writer = ScribeWriter('localhost', 1464, 'test_category', silent=True)
writer.write('test_message_1')
writer.write(['test_message_1', 'test_message_2', 'test_message_3'])
Expand Down
2 changes: 1 addition & 1 deletion scribe_logger/writer.py
Expand Up @@ -19,7 +19,7 @@ class ScribeWriter(object):

"""Default category to write to"""
DEFAULT_CATEGORY = 'default'
SILENT=False
SILENT = False

def __init__(self, host, port, category=DEFAULT_CATEGORY, silent=SILENT):
self.category = category
Expand Down

0 comments on commit 124f9f2

Please sign in to comment.