Module Expr Str ImportFrom alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias alias Expr Call NameLoad Str ImportFrom alias identifier ImportFrom alias ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Str Assign NameStore Call NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad With NameLoad body TryExcept body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad handlers ExceptHandler type NameLoad name NameStore body Raise Call NameLoad Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Str Assign NameStore Call NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad With NameLoad body TryExcept body Expr Call AttributeLoad NameLoad attr Call AttributeLoad Str attr NameLoad handlers ExceptHandler type NameLoad name NameStore body Raise Call NameLoad Call AttributeLoad Str attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body FunctionDef arguments args defaults body Expr BinOpDiv Num Num decorator_list Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad Assign NameStore Call NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad TryExcept body Expr Call NameLoad handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr Str keyword AttributeLoad NameLoad attr TryFinally body Expr Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr finalbody Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad Assign NameStore Call NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad TryExcept body Expr Call NameLoad handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr Str keyword AttributeLoad NameLoad attr TryFinally body Expr Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr finalbody Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad Assign NameStore Call NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad TryExcept body Expr Call NameLoad handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr Str keyword AttributeLoad NameLoad attr TryFinally body Expr Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Str Call AttributeLoad NameLoad attr finalbody Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list decorator_list If CompareEq NameLoad Str body ImportFrom alias Expr Call NameLoad NameLoad keyword NameLoad
N/A N/A 
    :codeauthor: :email:`Pedro Algarvio (pedro@algarvio.me)`


    tests.unit.log_test
    ~~~~~~~~~~~~~~~~~~~

    Test salt's "hacked" logging
 __future__ absolute_import N/A logging salt.ext.six.moves StringIO salttesting.case TestCase salttesting.helpers ensure_in_syspath TestsLoggingHandler N/A N/A ensure_in_syspath ../ salt.log setup saltlog salt.log.handlers StreamHandler TestLog N/A TestCase N/A N/A 
    Test several logging settings
     test_issue_2853_regex_TypeError N/A N/A self N/A N/A N/A log N/A N/A saltlog SaltLoggingClass __name__ N/A log_format [%(name)-15s] %(message)s N/A handler N/A TestsLoggingHandler format log_format N/A N/A N/A log addHandler handler N/A handler N/A N/A N/A N/A N/A N/A saltlog SaltLoggingClass N/A N/A {0}.with_digits format __name__ N/A N/A N/A Exception N/A err N/A N/A N/A AssertionError N/A N/A No exception should have been raised: {0} format err N/A N/A N/A log removeHandler handler N/A log_format [%(name)s] %(message)s N/A handler N/A TestsLoggingHandler format log_format N/A N/A N/A log addHandler handler N/A handler N/A N/A N/A N/A N/A N/A saltlog SaltLoggingClass N/A N/A {0}.without_digits format __name__ N/A N/A N/A Exception N/A err N/A N/A N/A AssertionError N/A N/A No exception should have been raised: {0} format err N/A N/A N/A log removeHandler handler N/A test_exc_info_on_loglevel N/A N/A self N/A N/A raise_exception_on_purpose N/A N/A N/A N/A N/A N/A 1 0 N/A N/A log N/A N/A saltlog SaltLoggingClass __name__ N/A stream1 N/A StringIO N/A stream2 N/A StringIO N/A handler1 N/A StreamHandler stream1 N/A handler2 N/A StreamHandler stream2 N/A N/A N/A handler1 setLevel N/A logging INFO N/A N/A N/A handler2 setLevel N/A logging DEBUG N/A N/A N/A log addHandler handler1 N/A N/A N/A log addHandler handler2 N/A N/A N/A N/A raise_exception_on_purpose N/A N/A N/A ZeroDivisionError N/A exc N/A N/A N/A N/A log error Exception raised on purpose caught: ZeroDivisionError exc_info_on_loglevel N/A logging DEBUG N/A N/A N/A N/A N/A self assertIn Exception raised on purpose caught: ZeroDivisionError N/A N/A stream1 getvalue N/A N/A N/A self assertNotIn Traceback (most recent call last) N/A N/A stream1 getvalue N/A N/A N/A self assertIn Exception raised on purpose caught: ZeroDivisionError N/A N/A stream2 getvalue N/A N/A N/A self assertIn Traceback (most recent call last) N/A N/A stream2 getvalue N/A N/A N/A N/A log removeHandler handler1 N/A N/A N/A log removeHandler handler2 N/A stream1 N/A StringIO N/A stream2 N/A StringIO N/A handler1 N/A StreamHandler stream1 N/A handler2 N/A StreamHandler stream2 N/A N/A N/A handler1 setLevel N/A logging INFO N/A N/A N/A handler2 setLevel N/A logging DEBUG N/A N/A N/A log addHandler handler1 N/A N/A N/A log addHandler handler2 N/A N/A N/A N/A raise_exception_on_purpose N/A N/A N/A ZeroDivisionError N/A exc N/A N/A N/A N/A log error Exception raised on purpose caught: ZeroDivisionError exc_info_on_loglevel N/A logging INFO N/A N/A N/A N/A N/A self assertIn Exception raised on purpose caught: ZeroDivisionError N/A N/A stream1 getvalue N/A N/A N/A self assertIn Traceback (most recent call last) N/A N/A stream1 getvalue N/A N/A N/A self assertIn Exception raised on purpose caught: ZeroDivisionError N/A N/A stream2 getvalue N/A N/A N/A self assertIn Traceback (most recent call last) N/A N/A stream2 getvalue N/A N/A N/A N/A log removeHandler handler1 N/A N/A N/A log removeHandler handler2 N/A stream1 N/A StringIO N/A stream2 N/A StringIO N/A handler1 N/A StreamHandler stream1 N/A handler2 N/A StreamHandler stream2 N/A N/A N/A handler1 setLevel N/A logging ERROR N/A N/A N/A handler2 setLevel N/A logging INFO N/A N/A N/A log addHandler handler1 N/A N/A N/A log addHandler handler2 N/A N/A N/A N/A raise_exception_on_purpose N/A N/A N/A ZeroDivisionError N/A exc N/A N/A N/A N/A log error Exception raised on purpose caught: ZeroDivisionError exc_info_on_loglevel N/A logging DEBUG N/A N/A N/A N/A N/A self assertIn Exception raised on purpose caught: ZeroDivisionError N/A N/A stream1 getvalue N/A N/A N/A self assertNotIn Traceback (most recent call last) N/A N/A stream1 getvalue N/A N/A N/A self assertIn Exception raised on purpose caught: ZeroDivisionError N/A N/A stream2 getvalue N/A N/A N/A self assertNotIn Traceback (most recent call last) N/A N/A stream2 getvalue N/A N/A N/A N/A log removeHandler handler1 N/A N/A N/A log removeHandler handler2 N/A N/A N/A N/A __name__ __main__ N/A integration run_tests N/A N/A run_tests TestLog needs_daemon False