Examples ======== .. literalinclude :: ../../../examples/decorator.py :language: python :caption: The ``book.mark`` as a `decorator`_ .. literalinclude :: ../../../examples/contexts.py :language: python :caption: Using ``book`` as a `context manager`_ .. literalinclude :: ../../../examples/outputs.py :language: python :caption: Changing where you jot down your logs .. literalinclude :: ../../../examples/services.py :language: python :caption: A toy example showing how to link logs across the web with `flask`_ .. literalinclude :: ../../../examples/threads.py :language: python :caption: Link logs between asynchronous `threads`_ :name: threads_example .. literalinclude :: ../../../examples/processes.py :language: python :caption: Link logs between asynchronous `processes`_ .. External Links .. ============== .. _decorator: https://realpython.com/blog/python/primer-on-python-decorators/ .. _context manager: http://book.pythontips.com/en/latest/context_managers.html .. _flask: http://flask.pocoo.org/ .. _threads: https://docs.python.org/3/library/threading.html .. _processes: https://docs.python.org/3/library/multiprocesing.html