Repository: meltano/meltano

Issue:
Adjust logging level for requests/urllib
With the hub changes and especially snowplow changes, when running with debug mode enabled we're littering the logs with some giant http requests (scroll the code block to get an idea of how large these look in the console when line wrapped):

```
(melty-3.8) ➜  rundev MELTANO_DISABLE_TRACKING=False MELTANO_SNOWPLOW_COLLECTOR_ENDPOINTS='["http://localhost:9090"]' meltano --log-level=debug invoke tap-gitlab
2022-06-04T23:19:04.941335Z [debug    ] Creating engine <meltano.core.project.Project object at 0x109533a60>@sqlite:////Users/syn/projects/meltano-projects/rundev/.meltano/meltano.db
2022-06-04T23:19:04.996207Z [debug    ] Starting new HTTP connection (1): localhost:9090
2022-06-04T23:19:05.030353Z [debug    ] http://localhost:9090 "GET /i?e=ue&ue_px=eyJzY2hlbWEiOiAiaWdsdTpjb20uc25vd3Bsb3dhbmFseXRpY3Muc25vd3Bsb3cvdW5zdHJ1Y3RfZXZlbnQvanNvbnNjaGVtYS8xLTAtMCIsICJkYXRhIjogeyJzY2hlbWEiOiAiaWdsdTpjb20ubWVsdGFuby9jbGlfZXZlbnQvanNvbnNjaGVtYS8xLTAtMCIsICJkYXRhIjogeyJldmVudCI6ICJzdGFydGVkIn19fQ%3D%3D&eid=ee086532-f9be-4819-9b66-3dc04049096a&dtm=1654384744990&cx=eyJzY2hlbWEiOiAiaWdsdTpjb20uc25vd3Bsb3dhbmFseXRpY3Muc25vd3Bsb3cvY29udGV4dHMvanNvbnNjaGVtYS8xLTAtMSIsICJkYXRhIjogW3sic2NoZW1hIjogImlnbHU6Y29tLm1lbHRhbm8vZW52aXJvbm1lbnRfY29udGV4dC9qc29uc2NoZW1hLzEtMC0wIiwgImRhdGEiOiB7ImNvbnRleHRfdXVpZCI6ICIxZThmNDdmMS04NDU2LTQ0NDEtOTY5ZS0yZDkyNTk0OThiZGUiLCAibWVsdGFub192ZXJzaW9uIjogIjEuMTA1LjAiLCAiaXNfZGV2X2J1aWxkIjogdHJ1ZSwgImlzX2NpX2Vudmlyb25tZW50IjogdHJ1Z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g5Mzk1MDljLTM2ZTEtNDI3Ny1hZTNmLTExMTcwNjk2MWY2YiIsICJwcm9qZWN0X3V1aWQiOiAiMWE3ZDk5ODktZjcwNC00ODViLWJhN2EtYTc0Nzg3MDNjYTdiIiwgInByb2plY3RfdXVpZF9zb3VyY2UiOiAiZXhwbGljaXQiLCAiY2xpZW50X3V1aWQiOiAiYmMwM2RkYzgtN2MyNS00NTdjLTk1NTYtNjE1M2M4MzZmMTk1IiwgImVudmlyb25tZW50X25hbWVfaGFzaCI6IG51bGx9fSwgeyJzY2hlbWEiOiAiaWdsdTpjb20ubWVsdGFuby9jbGlfY29udGV4dC9qc29uc2NoZW1hLzEtMC0wIiwgImRhdGEiOiB7ImV2ZW50X3V1aWQiOiAiNDU0MWQ4MTAtYjUwMC00MDg2LWEwMzUtMTAwZGYwNTI4ZGMzIiwgImNvbW1hbmQiOiAiaW52b2tlIiwgInN1Yl9jb21tYW5kIjogbnVsbCwgIm9wdGlvbl9rZXlzIjogW119fV19&tv=py-0.10.0&p=pc&lang=en_US&tz=America%2FChicago&stm=1654384744000 HTTP/1.1" 200 43
2022-06-04T23:19:05.060016Z [debug    ] Lockfile is feature-flagged    status=False
2022-06-04T23:19:05.103509Z [debug    ] Starting new HTTPS connection (1): discovery.meltano.com:443
2022-06-04T23:19:05.266283Z [debug    ] https://discovery.meltano.com:443 "GET /discovery.yml?project_id=1a7d9989-f704-485b-ba7a-a7478703ca7b HTTP/1.1" 200 23607
2022-06-04T23:19:05.693139Z [debug    ] Found plugin                   plugin=tap-gitlab source=discovery
2022-06-04T23:16:48.221553Z [debug    ] http://localhost:9090 "GET /i?e=se&se_ca=meltano+invoke&se_ac=meltano+invoke+tap-gitlab+&se_la=1a7d9989-f704-485b-ba7a-a7478703ca7b&eid=ca88b1c2-551a-4334-8a25-f793f68b8a96&dtm=1654384608194&tv=py-0.10.0&p=pc&lang=en_US&tz=America%2FChicago&stm=1654384608000 HTTP/1.1" 200 43
2022-06-04T23:16:48.225794Z [debug    ] Starting new HTTP connection (1): localhost:9090
2022-06-04T23:16:48.240215Z [debug    ] http://localhost:9090 "GET /i?e=ue&ue_px=eyJzY2hlbWEiOiAiaWdsdTpjb20uc25vd3Bsb3dhbmFseXRpY3Muc25vd3Bsb3cvdW5zdHJ1Y3RfZXZlbnQvanNvbnNjaGVtYS8xLTAtMCIsICJkYXRhIjogeyJzY2hlbWEiOiAiaWdsdTpjb20ubWVsdGFuby9jbGlfZXZlbnQvanNvbnNjaGVtYS8xLTAtMCIsICJkYXRhIjogeyJldmVudCI6ICJjb21wbGV0ZWQifX19&eid=b42bfc91-8a1f-4dde-924f-9d7d5c634a49&dtm=1654384608222&cx=eyJzY2hlbWEiOiAiaWdsdTpjb20uc25vd3Bsb3dhbmFseXRpY3Muc25vd3Bsb3cvY29udGV4dHMvanNvbnNjaGVtYS8xLTAtMSIsICJkYXRhIjogW3sic2NoZW1hIjogImlnbHU6Y29tLm1lbHRhbm8vZW52aXJvbm1lbnRfY29udGV4dC9qc29uc2NoZW1hLzEtMC0wIiwgImRhdGEiOiB7ImNvbnRleHRfdXVpZCI6ICJlMDBjZTExYS1iYTg0LTRiZDctOWJlZC1kZWNkODBkZDFmNTMiLCAibWVsdGFub192ZXJzaW9uIjogIjEuMTA1LjAiLCAiaXNfZGV2X2J1aWxkIjogdHJ1ZSwgImlzX2NpX2Vudmlyb25tZW50IjogdHJ1ZSwgInB5dGhvbl92ZXJzaW9uIjogIjMuOC4xMiIsICJzeXN0ZW1fbmFtZSI6ICJEYXJ3aW4iLCAic3lzdGVtX3JlbGVhc2UiOiAiMjEuMS4wIiwgInN5c3RlbV92ZXJzaW9uIjogIkRhcndpbiBLZXJuZWwgVmVyc2lvbiAyMS4xLjA6IFdlZCBPY3QgMTMgMTc6MzM6MDEgUERUIDIwMjE7IHJvb3Q6eG51LTgwMTkuNDEuNX4xL1JFTEVBU0VfQVJNNjRfVDYwMDAiLCAibWFjaGluZSI6ICJhcm02NCIsICJ3aW5kb3dzX2VkaXRp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Fuby9jbGlfY29udGV4dC9qc29uc2NoZW1hLzEtMC0wIiwgImRhdGEiOiB7ImV2ZW50X3V1aWQiOiAiNmRkZDRjYjktMTVlYi00NjA2LTgyYzEtMWJkMjEwZjNkNzM5IiwgImNvbW1hbmQiOiAiaW52b2tlIiwgInN1Yl9jb21tYW5kIjogbnVsbCwgIm9wdGlvbl9rZXlzIjogW119fV19&tv=py-0.10.0&p=pc&lang=en_US&tz=America%2FChicago&stm=1654384608000 HTTP/1.1" 200 43
```

We should proactively set the logging level of urllib3 to only print info or higher, e.g:

```python
        logging.getLogger("urllib3").setLevel(logging.INFO)
```


Discussion:
This is *super duper* annoying, until we fix it, a `logger` entry like the below in logging.yaml will also suppress these:

```yaml:
version: 1
disable_existing_loggers: false

formatters:
  default:
    format: "[%(asctime)s] [%(process)d|%(threadName)10s|%(name)s] [%(levelname)s] %(message)s"
  structured_plain:
    (): meltano.core.logging.console_log_formatter
    colors: False
  structured_colored:
    (): meltano.core.logging.console_log_formatter
    colors: True
  key_value:
    (): meltano.core.logging.key_value_formatter
    sort_keys: False
  json:
    (): meltano.core.logging.json_formatter

handlers:
  console:
    class: logging.StreamHandler
    level: DEBUG
    formatter: structured_colored
    stream: "ext://sys.stderr"
  file:
    class: logging.FileHandler
    level: INFO
    filename: meltano.log
    formatter: structured_plain

root:
  level: DEBUG
  propagate: yes
  handlers: [console, file]

loggers:
  urllib3:   <--------------- the magic
    level: INFO
    handlers: [console, file]
    propogate: no
```
@pandemicsyn Shouldn't we be logging which logger is emitting the log message? If we did that then our logs would have something like `2022-06-04T23:19:04.996207Z [debug    ] [<logger name>]` at the start of each line, which would make it trivial to filter out anything from `urllib3`.

Resolving patch:
diff --git a/src/meltano/core/logging/utils.py b/src/meltano/core/logging/utils.py
--- a/src/meltano/core/logging/utils.py
+++ b/src/meltano/core/logging/utils.py
@@ -95,6 +95,11 @@ def default_config(log_level: str) -> dict:
                 "handlers": ["console"],
                 "level": logging.ERROR,
             },
+            "urllib3": {
+                "handlers": ["console"],
+                "level": logging.INFO,
+                "propagate": False,
+            },
         },
     }
 


Test patch: