[Bug] BrokenPipeError when stopping data_layer from CLI
### What happened?

When doing `chia stop data` at the command line, the following error is shown:

```
chia_data_layer: Exception ignored in: <_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>
BrokenPipeError: [Errno 32] Broken pipe
```
Seems like it does actually stop the service successfully and I haven't found any problems with the service after restarting.  

### Version

1.6.0

### What platform are you using?

Linux

### What ui mode are you using?

CLI

### Relevant log output

```shell
2022-09-26T15:24:26.692 data_layer data_layer             : INFO     Waiting for service _await_closed callback
2022-09-26T15:24:26.694 data_layer data_layer             : INFO     Service data_layer at port 8561 fully closed
2022-09-26T15:24:26.917 data_layer asyncio                : ERROR    Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0xffff7c105240>
```

Running on Ubuntu on ARM, installed Chia from source. Connected to Testnet10.  
diff --git a/chia/server/start_data_layer.py b/chia/server/start_data_layer.py
index ef6a1f982..e9eee0765 100644
--- a/chia/server/start_data_layer.py
+++ b/chia/server/start_data_layer.py
@@ -1,8 +1,10 @@
 from __future__ import annotations
 
+import contextlib
 import logging
 import pathlib
 import sys
+from io import TextIOWrapper
 from typing import Any, Dict, Optional, cast
 
 from chia.data_layer.data_layer import DataLayer
@@ -25,6 +27,20 @@ SERVICE_NAME = "data_layer"
 log = logging.getLogger(__name__)
 
 
+class StdOutputLogger(TextIOWrapper):
+    def __init__(self, logger: logging.Logger, level: int = logging.INFO) -> None:
+        self.logger = logger
+        self.level = level
+
+    def write(self, message: str) -> int:
+        if message and not message.isspace():
+            self.logger.log(self.level, message)
+        return 0
+
+    def flush(self) -> None:
+        pass
+
+
 # TODO: Review need for config and if retained then hint it properly.
 def create_data_layer_service(
     root_path: pathlib.Path,
@@ -79,16 +95,19 @@ async def async_main() -> int:
         root_path=DEFAULT_ROOT_PATH,
     )
 
-    create_all_ssl(
-        root_path=DEFAULT_ROOT_PATH,
-        private_node_names=["data_layer"],
-        public_node_names=["data_layer"],
-        overwrite=False,
-    )
-
-    service = create_data_layer_service(DEFAULT_ROOT_PATH, config)
-    await service.setup_process_global_state()
-    await service.run()
+    with contextlib.redirect_stdout(
+        StdOutputLogger(log, logging.INFO)
+    ) if not sys.stdout.isatty() else contextlib.nullcontext():
+        create_all_ssl(
+            root_path=DEFAULT_ROOT_PATH,
+            private_node_names=["data_layer"],
+            public_node_names=["data_layer"],
+            overwrite=False,
+        )
+
+        service = create_data_layer_service(DEFAULT_ROOT_PATH, config)
+        await service.setup_process_global_state()
+        await service.run()
 
     return 0
 
['chia/server/start_data_layer.py']