Module Assign NameStore Str Import alias Import alias Import alias Import alias identifier ImportFrom alias ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr keyword NameLoad keyword Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad Call AttributeLoad NameLoad attr Str attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad Call AttributeLoad NameLoad attr Str attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad Call AttributeLoad NameLoad attr Str attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad Call AttributeLoad NameLoad attr Str attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad Call AttributeLoad NameLoad attr Str attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str Num Dict Str Num Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str keyword NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword NameLoad Expr Call AttributeLoad NameLoad attr Str Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword NameLoad Expr Call AttributeLoad NameLoad attr Str Num Dict Str Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword NameLoad Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Num Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Dict Str Num Expr Call AttributeLoad NameLoad attr Dict Str Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad Call AttributeLoad NameLoad attr Str attr Dict Str Num keyword NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr keyword NameLoad keyword Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword Num keyword Num Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Str Assign NameStore Str For NameStore Call NameLoad Num body Assign NameStore BinOpMod Str NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str keyword Num keyword Str keyword Num Expr Call AttributeLoad NameLoad attr Str keyword Num keyword Str keyword Num Expr Call AttributeLoad NameLoad attr Str keyword Num keyword Str keyword Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Str keyword Num keyword Str keyword Num Expr Call AttributeLoad NameLoad attr Str keyword Num keyword Str keyword Num Expr Call AttributeLoad NameLoad attr Str keyword Num keyword Str keyword Num Expr Call AttributeLoad NameLoad attr Str keyword Num keyword Str keyword Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr Num decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Num Num body Expr Str AugAssignAdd AttributeStore NameLoad attr NameLoad AugAssignAdd AttributeStore NameLoad attr NameLoad decorator_list decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body If CompareIs NameLoad NameLoad body Assign NameStore AttributeLoad NameLoad attr Assign NameStore NameLoad TryFinally body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad For NameStore NameLoad body If Call AttributeLoad NameLoad attr NameLoad body Return NameLoad Return NameLoad finalbody If CompareIsNot NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr decorator_list decorator_list
N/A N/A __author__ czerwin@scalyr.com N/A os N/A re N/A tempfile N/A scalyr_agent.scalyr_logging scalyr_logging scalyr_agent.test_base ScalyrTestCase ScalyrLoggingTest N/A ScalyrTestCase N/A setUp N/A N/A self N/A N/A N/A N/A self __log_path N/A N/A tempfile mktemp .log N/A N/A N/A scalyr_logging set_log_destination use_disk True logs_directory N/A N/A N/A os path dirname N/A self __log_path agent_log_file_path N/A self __log_path N/A N/A self __logger N/A N/A scalyr_logging getLogger scalyr_agent.agent_main N/A test_output_to_file N/A N/A self N/A N/A N/A N/A N/A N/A self __logger info Hello world N/A N/A N/A self assertTrue N/A N/A self __log_contains Hello world N/A test_component_name N/A N/A self N/A N/A N/A N/A N/A self assertEquals N/A N/A self __logger component core N/A N/A N/A self assertEquals N/A N/A N/A scalyr_logging getLogger scalyr_agent component core N/A N/A N/A self assertEquals N/A N/A N/A scalyr_logging getLogger scalyr_agent.foo component core N/A N/A N/A self assertEquals N/A N/A N/A scalyr_logging getLogger scalyr_agent.foo.bar component core N/A N/A N/A self assertEquals N/A N/A N/A scalyr_logging getLogger scalyr_agent.builtin_monitors.foo component monitor:foo N/A N/A N/A self assertEquals N/A N/A N/A scalyr_logging getLogger scalyr_agent.builtin_monitors.foo(ok) component monitor:foo(ok) N/A test_formatter N/A N/A self N/A N/A N/A N/A N/A N/A self __logger info Test line %d 5 N/A N/A N/A self assertTrue N/A N/A self __log_contains \d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}.\d{3}Z INFO \[core\] \[.*\.py:\d+\] Test line 5 N/A test_error_code N/A N/A self N/A N/A N/A N/A N/A N/A self __logger warn Bad result error_code statusCode N/A N/A N/A self assertTrue N/A N/A self __log_contains \[error="statusCode"\] Bad result N/A test_child_modules N/A N/A self N/A N/A N/A child N/A N/A scalyr_logging getLogger scalyr_agent.foo.bar N/A N/A N/A child info Child statement N/A N/A N/A self assertTrue N/A N/A self __log_contains Child statement N/A test_sibling_modules N/A N/A self N/A N/A N/A child N/A N/A scalyr_logging getLogger external_package.my_monitor N/A N/A N/A child info Sibling statement N/A N/A N/A self assertTrue N/A N/A self __log_contains Sibling statement N/A test_metric_logging N/A N/A self N/A N/A N/A monitor_instance N/A N/A ScalyrLoggingTest FakeMonitor testing N/A metric_file_path N/A N/A tempfile mktemp .log N/A monitor_logger N/A N/A scalyr_logging getLogger scalyr_agent.builtin_monitors.foo(1) N/A N/A N/A monitor_logger openMetricLogForMonitor metric_file_path monitor_instance N/A N/A N/A monitor_logger emit_value test_name 5 N/A foo 5 N/A N/A N/A self assertEquals N/A monitor_instance reported_lines 1 N/A N/A N/A self assertTrue N/A N/A self __log_contains test_name 5 file_path metric_file_path N/A N/A N/A self assertTrue N/A N/A self __log_contains foo=5 file_path metric_file_path N/A N/A N/A self assertFalse N/A N/A self __log_contains foo=5 N/A N/A N/A monitor_logger closeMetricLog N/A test_logging_to_metric_log N/A N/A self N/A N/A N/A monitor_instance N/A N/A ScalyrLoggingTest FakeMonitor testing N/A metric_file_path N/A N/A tempfile mktemp .log N/A monitor_logger N/A N/A scalyr_logging getLogger scalyr_agent.builtin_monitors.foo(1) N/A N/A N/A monitor_logger openMetricLogForMonitor metric_file_path monitor_instance N/A N/A N/A monitor_logger info foobaz is fine emit_to_metric_log True N/A N/A N/A self assertEquals N/A monitor_instance reported_lines 1 N/A N/A N/A self assertTrue N/A N/A self __log_contains foobaz is fine file_path metric_file_path N/A N/A N/A self assertFalse N/A N/A self __log_contains foobaz is fine N/A N/A N/A monitor_logger closeMetricLog N/A test_metric_logging_with_bad_name N/A N/A self N/A N/A N/A monitor_instance N/A N/A ScalyrLoggingTest FakeMonitor testing N/A metric_file_path N/A N/A tempfile mktemp .log N/A monitor_logger N/A N/A scalyr_logging getLogger scalyr_agent.builtin_monitors.foo(1) N/A N/A N/A monitor_logger openMetricLogForMonitor metric_file_path monitor_instance N/A N/A N/A monitor_logger emit_value 1name 5 N/A N/A N/A self assertTrue N/A N/A self __log_contains sa_1name file_path metric_file_path N/A N/A N/A monitor_logger emit_value name+hi 5 N/A N/A N/A self assertTrue N/A N/A self __log_contains name_hi file_path metric_file_path N/A N/A N/A monitor_logger emit_value name 5 N/A hi+ 6 N/A N/A N/A self assertTrue N/A N/A self __log_contains hi_ file_path metric_file_path N/A N/A N/A monitor_logger closeMetricLog N/A test_errors_for_monitor N/A N/A self N/A N/A N/A monitor_instance N/A N/A ScalyrLoggingTest FakeMonitor testing N/A metric_file_path N/A N/A tempfile mktemp .log N/A monitor_logger N/A N/A scalyr_logging getLogger scalyr_agent.builtin_monitors.foo(1) N/A N/A N/A monitor_logger openMetricLogForMonitor metric_file_path monitor_instance N/A N/A N/A monitor_logger error Foo N/A N/A N/A self assertEquals N/A monitor_instance errors 1 N/A N/A N/A monitor_logger closeMetricLog N/A test_module_with_different_metric_logs N/A N/A self N/A N/A N/A monitor_one N/A N/A ScalyrLoggingTest FakeMonitor testing one N/A monitor_two N/A N/A ScalyrLoggingTest FakeMonitor testing two N/A metric_file_one N/A N/A tempfile mktemp .log N/A metric_file_two N/A N/A tempfile mktemp .log N/A logger_one N/A N/A scalyr_logging getLogger scalyr_agent.builtin_monitors.foo(1) N/A logger_two N/A N/A scalyr_logging getLogger scalyr_agent.builtin_monitors.foo(2) N/A N/A N/A logger_one openMetricLogForMonitor metric_file_one monitor_one N/A N/A N/A logger_two openMetricLogForMonitor metric_file_two monitor_two N/A N/A N/A logger_one report_values N/A foo 5 N/A N/A N/A logger_two report_values N/A bar 4 N/A N/A N/A self assertTrue N/A N/A self __log_contains foo=5 file_path metric_file_one N/A N/A N/A self assertTrue N/A N/A self __log_contains bar=4 file_path metric_file_two N/A N/A N/A self assertFalse N/A N/A self __log_contains foo=5 file_path metric_file_two N/A N/A N/A self assertFalse N/A N/A self __log_contains bar=4 file_path metric_file_one N/A N/A N/A self assertFalse N/A N/A self __log_contains foo=5 N/A N/A N/A self assertFalse N/A N/A self __log_contains bar=4 N/A N/A N/A logger_one closeMetricLog N/A N/A N/A logger_two closeMetricLog N/A test_pass_in_module_with_metric N/A N/A self N/A N/A N/A monitor_instance N/A N/A ScalyrLoggingTest FakeMonitor testing N/A metric_file_path N/A N/A tempfile mktemp .log N/A monitor_logger N/A N/A scalyr_logging getLogger scalyr_agent.builtin_monitors.foo(1) N/A N/A N/A monitor_logger openMetricLogForMonitor metric_file_path monitor_instance N/A N/A N/A N/A N/A scalyr_logging getLogger scalyr_agent.builtin_monitors.foo report_values N/A foo 5 monitor monitor_instance N/A N/A N/A self assertTrue N/A N/A self __log_contains foo=5 file_path metric_file_path N/A N/A N/A self assertFalse N/A N/A self __log_contains foo=5 N/A N/A N/A monitor_logger closeMetricLog N/A test_rate_limit N/A N/A self N/A N/A N/A N/A self __log_path N/A N/A tempfile mktemp .log N/A N/A N/A scalyr_logging set_log_destination use_disk True logs_directory N/A N/A N/A os path dirname N/A self __log_path agent_log_file_path N/A self __log_path max_write_burst 250 log_write_rate 0 N/A N/A self __logger N/A N/A scalyr_logging getLogger scalyr_agent.agent_main N/A string_300 N/A i N/A range 300 N/A N/A string_300 N/A %sa string_300 N/A N/A N/A N/A self __logger info First message N/A N/A N/A self assertTrue N/A N/A self __log_contains First message N/A N/A N/A N/A self __logger info Dropped message %s string_300 N/A N/A N/A self assertFalse N/A N/A self __log_contains Dropped message N/A N/A N/A N/A self __logger info Second message N/A N/A N/A self assertTrue N/A N/A self __log_contains Second message N/A N/A N/A self assertTrue N/A N/A self __log_contains Warning, skipped writing 1 log lines N/A test_limit_once_per_x_secs N/A N/A self N/A N/A N/A log N/A N/A scalyr_logging getLogger scalyr_agent.foo N/A N/A N/A log info First record limit_once_per_x_secs 60.0 limit_key foo current_time 0.0 N/A N/A N/A log info Second record limit_once_per_x_secs 60.0 limit_key foo current_time 1.0 N/A N/A N/A log info Third record limit_once_per_x_secs 60.0 limit_key foo current_time 61.0 N/A N/A N/A self assertTrue N/A N/A self __log_contains First record N/A N/A N/A self assertFalse N/A N/A self __log_contains Second record N/A N/A N/A self assertTrue N/A N/A self __log_contains Third record N/A N/A N/A log info First record limit_once_per_x_secs 30.0 limit_key foo current_time 0.0 N/A N/A N/A log info Second record limit_once_per_x_secs 60.0 limit_key bar current_time 1.0 N/A N/A N/A log info Third record limit_once_per_x_secs 30.0 limit_key foo current_time 31.0 N/A N/A N/A log info Fourth record limit_once_per_x_secs 60.0 limit_key bar current_time 31.0 N/A N/A N/A self assertTrue N/A N/A self __log_contains First record N/A N/A N/A self assertTrue N/A N/A self __log_contains Second record N/A N/A N/A self assertTrue N/A N/A self __log_contains Third record N/A N/A N/A self assertFalse N/A N/A self __log_contains Fourth record N/A FakeMonitor N/A object N/A N/A Just a simple class that we use in place of actual Monitor objects when reporting metrics. __init__ N/A N/A self name N/A N/A N/A N/A self __name name N/A N/A self reported_lines 0 N/A N/A self errors 0 N/A increment_counter N/A N/A self reported_lines errors N/A 0 0 N/A N/A Increment some of the counters pertaining to the performance of this monitor.
             N/A N/A self reported_lines reported_lines N/A N/A self errors errors N/A N/A __log_contains N/A N/A self expression file_path N/A None N/A N/A N/A file_path None N/A N/A file_path N/A self __log_path N/A filep None N/A N/A N/A matcher N/A N/A re compile expression N/A filep N/A open file_path N/A line filep N/A N/A N/A N/A matcher search line N/A N/A True N/A False N/A N/A N/A filep None N/A N/A N/A N/A filep close N/A N/A