diff options
| author | Guillaume Horel <guillaume.horel@serenitascapital.com> | 2016-10-28 15:28:12 -0400 |
|---|---|---|
| committer | Guillaume Horel <guillaume.horel@serenitascapital.com> | 2016-10-28 15:28:12 -0400 |
| commit | a26c9dd0a1b20cdad4136a8f5d7c5b559e82ddd9 (patch) | |
| tree | 1950e5aea79a9b08ce82d796edee6044f07aaba7 | |
| parent | 56b0cf6b54bd666a840bc35b1c5f8099906be320 (diff) | |
| download | pyisda-a26c9dd0a1b20cdad4136a8f5d7c5b559e82ddd9.tar.gz | |
better docs
| -rw-r--r-- | pyisda/logging.pyx | 11 |
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 |
