87f22614a3a97d93aaf570ba1c3eeefcbfdb8d5f,tests/python/pants_test/init/test_logging.py,,test_log_filtering_by_rule,#,42

Before Change


        log_levels_by_target={
            "debug_target": LogLevel.DEBUG,
        },
        message_regex_filters=(),
    )
    with temporary_dir() as tmpdir:
        setup_logging_to_file(LogLevel.INFO, log_dir=tmpdir)

After Change


        )

        // Do not set up a stdio destination, meaning that all messages will go to the log.
        global_bootstrap_options = ob.bootstrap_options.for_global_scope()
        with initialize_stdio(global_bootstrap_options):
            native_engine.write_log(
                msg="log msg one", level=LogLevel.INFO.level, target="some.target"
            )
            native_engine.write_log(
                msg="log msg two", level=LogLevel.DEBUG.level, target="some.other.target"
            )
            native_engine.write_log(
                msg="log msg three", level=LogLevel.DEBUG.level, target="debug_target"
            )

            loglines = (
                Path(global_bootstrap_options.pants_workdir, "pants.log").read_text().splitlines()
            )

            assert "[INFO] log msg one" in loglines[0]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: pantsbuild/pants
Commit Name: 87f22614a3a97d93aaf570ba1c3eeefcbfdb8d5f
Time: 2021-03-01
Author: stuhood@gmail.com
File Name: tests/python/pants_test/init/test_logging.py
Class Name:
Method Name: test_log_filtering_by_rule


Project Name: pantsbuild/pants
Commit Name: 87f22614a3a97d93aaf570ba1c3eeefcbfdb8d5f
Time: 2021-03-01
Author: stuhood@gmail.com
File Name: tests/python/pants_test/init/test_logging.py
Class Name:
Method Name: test_file_logging


Project Name: pantsbuild/pants
Commit Name: f4cf055ae16b2af7247a2288542e9cfd2608c775
Time: 2019-11-07
Author: benjyw@gmail.com
File Name: src/python/pants/help/help_printer.py
Class Name: HelpPrinter
Method Name: _print_goals_help