From a26c9dd0a1b20cdad4136a8f5d7c5b559e82ddd9 Mon Sep 17 00:00:00 2001 From: Guillaume Horel Date: Fri, 28 Oct 2016 15:28:12 -0400 Subject: better docs --- pyisda/logging.pyx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3-70-g09d2