Mercurial > hg > orthanc-book
changeset 372:cb1d9a5bb043
merge
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 02 Apr 2020 17:39:48 +0200 |
parents | 5cb37e6b014b (current diff) 8f7e9ebf7c96 (diff) |
children | f5bbdabb04d9 |
files | Sphinx/source/plugins/python.rst |
diffstat | 3 files changed, 54 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/Sphinx/source/developers/repositories.rst Thu Apr 02 17:39:35 2020 +0200 +++ b/Sphinx/source/developers/repositories.rst Thu Apr 02 17:39:48 2020 +0200 @@ -76,6 +76,14 @@ <https://en.wikipedia.org/wiki/TortoiseHg>`__ to browse the code with richer features than the Web interface. +.. highlight:: text + +You might have to set up a host fingerprint in the Mercurial +configuration. Add the following lines to your ``~/.hgrc`` file:: + + [hostfingerprints] + hg.orthanc-server.com = fc:45:10:18:69:4d:a6:2b:22:fa:c0:81:f4:ee:eb:8e:ba:ae:54:90 + Note for Microsoft Windows ..........................
--- a/Sphinx/source/faq/log.rst Thu Apr 02 17:39:35 2020 +0200 +++ b/Sphinx/source/faq/log.rst Thu Apr 02 17:39:48 2020 +0200 @@ -88,3 +88,13 @@ The command-line to be used is:: $ sudo docker run -a stderr -p 4242:4242 -p 8042:8042 --rm jodogne/orthanc --verbose /etc/orthanc > Orthanc.log 2>&1 + +Change the log level while Orthanc is running +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Starting from Orthanc 1.6.0, you can also change the log level while Orthanc is running through the Rest API:: + + $ curl -X PUT http://localhost:8042/tools/log-level -d "verbose" + $ curl -X PUT http://localhost:8042/tools/log-level -d "trace" + $ curl -X PUT http://localhost:8042/tools/log-level -d "default" +
--- a/Sphinx/source/plugins/python.rst Thu Apr 02 17:39:35 2020 +0200 +++ b/Sphinx/source/plugins/python.rst Thu Apr 02 17:39:48 2020 +0200 @@ -360,6 +360,42 @@ orthanc.RegisterRestCallback('/pydicom/(.*)', DecodeInstance) # (*) +.. _python-introspection: + +Inspecting the available API +............................ + +.. highlight:: python + +Thanks to Python's introspection primitives, it is possible to inspect +the API of the ``orthanc`` module in order to dump all the available +features:: + + import inspect + import numbers + import orthanc + + # Loop over the members of the "orthanc" module + for (name, obj) in inspect.getmembers(orthanc): + if inspect.isroutine(obj): + print('Function %s():\n Documentation: %s\n' % (name, inspect.getdoc(obj))) + + elif inspect.isclass(obj): + print('Class %s:\n Documentation: %s' % (name, inspect.getdoc(obj))) + + # Loop over the members of the class + for (subname, subobj) in inspect.getmembers(obj): + if isinstance(subobj, numbers.Number): + print(' - Enumeration value %s: %s' % (subname, subobj)) + elif (not subname.startswith('_') and + inspect.ismethoddescriptor(subobj)): + print(' - Method %s(): %s' % (subname, inspect.getdoc(subobj))) + print('') + + + + + Performance and concurrency ---------------------------