zed: Fix file logging being disabled accidentally (#51121) (cherry-pick to preview) (#51162)

zed-zippy[bot] and Lukas Wirth created

Cherry-pick of #51121 to preview

----
Release Notes:

- N/A *or* Added/Fixed/Improved ...

Co-authored-by: Lukas Wirth <lukas@zed.dev>

Change summary

crates/zed/src/main.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Detailed changes

crates/zed/src/main.rs 🔗

@@ -276,7 +276,7 @@ fn main() {
 
     zlog::init();
 
-    if true {
+    if stdout_is_a_pty() {
         zlog::init_output_stdout();
     } else {
         let result = zlog::init_output_file(paths::log_file(), Some(paths::old_log_file()));