summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Horel <guillaume.horel@serenitascapital.com>2016-10-28 15:28:12 -0400
committerGuillaume Horel <guillaume.horel@serenitascapital.com>2016-10-28 15:28:12 -0400
commita26c9dd0a1b20cdad4136a8f5d7c5b559e82ddd9 (patch)
tree1950e5aea79a9b08ce82d796edee6044f07aaba7
parent56b0cf6b54bd666a840bc35b1c5f8099906be320 (diff)
downloadpyisda-a26c9dd0a1b20cdad4136a8f5d7c5b559e82ddd9.tar.gz
better docs
-rw-r--r--pyisda/logging.pyx11
1 files changed, 10 insertions, 1 deletions
diff --git a/pyisda/logging.pyx b/pyisda/logging.pyx
index 5aa5282..2f94d16 100644
--- a/pyisda/logging.pyx
+++ b/pyisda/logging.pyx
@@ -1,10 +1,19 @@
+""" helper functions to use the logging facility"""
+
def enable_logging():
+ """turn on logging
+
+ default location is error.log in the $HOME directory.
+ To change from default use ``set_logging_file``
+ """
JpmcdsErrMsgOn()
def disable_logging():
+ """turn off logging"""
JpmcdsErrMsgOff()
def set_logging_file(str file_name, TBoolean append = True):
+ """set logging file"""
filename_bytes = file_name.encode('utf-8')
cdef char* c_string = filename_bytes
if JpmcdsErrMsgFileName(c_string, append) !=0:
@@ -16,5 +25,5 @@ def log_message(str msg):
JpmcdsErrLogWrite(c_msg)
def flush():
- if JpmcdsErrMsgFlush() !=0:
+ if JpmcdsErrMsgFlush() != 0:
raise