Messages at import time should go to the Python logger rather than stderr
Hi @JakeSummers ,

This might be intentional as it will give the users required info/warnings during import which may be useful for some users.As you know already this may be silenced by setting the environment variable `TF_CPP_MIN_LOG_LEVEL`. Also there are some logs generating from C++ backend passed to stderr directly. @SuryanarayanaY 

> This might be intentional as it will give the users required info/warnings during import which may be useful for some users

This is totally useful and I **do not want to silence these messages**.  

That being said, sending them directly to `stderr` is not best practice for Python packages.  Sending things through the logger is the standard behaviour.  

This allows them messages to get redirected to the right place.  Two examples of when `writing to stderr` doesn't work well: 

1. Because these logs are getting send to `stderr`, they are raising alerts in our monitoring system.  I probably need to redirect them to stdout to prevent this from happening but would prefer to not need to do this for all stderr messages.  
1. In some of my projects, we [explicitly forward logs to to gcp-logging ](https://cloud.google.com/logging/docs/reference/libraries#write_request_logs).  Since theses logs do not flow through the logger, these logs are lost.  

 I thought as a workaround, I would be able to do something like this: 

```python
    with redirect_stderr(sys.stdout):
        import tensorflow as tf
```

But it appears that doesn't work.  See stackoverflow question: https://stackoverflow.com/questions/77796003/how-to-redirect-tensorflow-import-errors-from-stderr-to-stdout This is the best workaround that I have found so far: 

```python
# NOTE this must be run prior to any other import tensorflow

from contextlib import redirect_stderr
from wurlitzer import sys_pipes
with redirect_stderr(sys.stdout):
    with sys_pipes():
        import tensorflow
```
### Issue type

Feature Request

### Have you reproduced the bug with TensorFlow Nightly?

No


### TensorFlow version

v2.15.0-rc1-8-g6887368d6d4 2.15.0

### OS platform and distribution

Mac Intel 14.1.1

### Python version

3.10.12

### Current behavior?

When I import tensorflow, it prints the following to `stderr`: 

```
[Jan-09 17:37]$ poetry run python -c "import tensorflow as tf; print('stdout here')" > stdout.txt
2024-01-09 17:38:41.470429: I tensorflow/core/platform/cpu_feature_guard.cc:182] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.

[Jan-09 17:38]$ cat stdout.txt
stdout here
```

Even if I configure my Python logger before importing tensorflow the results still go to stderr.  

This is a problem for me because these messages show up in my logging system as errors.  When I query my logs, it looks like the app is unhealthy.  

I know that I could silence messages using: 

```
import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '1' 

import tensorflow as tf
```
[Source](https://stackoverflow.com/a/76797348/251589)

But I would prefer to keep these messages.  

Possible solutions: 

Ideal solution: Use the python logger.  
Less ideal solution: Allow me to redirect these logs to stdout so they do not show up as errors.  

### Standalone code to reproduce the issue

```shell
Import tensorflow :)
```


### Relevant log output

_No response_

### Related issues and threads

* Similar discussion for Keras: https://github.com/keras-team/keras/issues/1406#issuecomment-410437449
* Similar feature request: https://github.com/tensorflow/tensorflow/issues/57553#issuecomment-1247641242
* https://stackoverflow.com/questions/35911252/disable-tensorflow-debugging-information