From b7b8a772f2a4c302f6bb1b75965e260c7944dad6 Mon Sep 17 00:00:00 2001 From: der richter Date: Thu, 30 Jan 2020 13:06:01 +0100 Subject: mac: remove stdout and stderr redirect for logging this was kinda useless anyway since the bundle was started with terminal=no and no logging was done anyway. Fixes #1590 --- osdep/macosx_application.m | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/osdep/macosx_application.m b/osdep/macosx_application.m index 7bf0737af9..7d42ca2a41 100644 --- a/osdep/macosx_application.m +++ b/osdep/macosx_application.m @@ -328,16 +328,6 @@ static void init_cocoa_application(bool regular) }); } -static void macosx_redirect_output_to_logfile(const char *filename) -{ - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - NSString *log_path = [NSHomeDirectory() stringByAppendingPathComponent: - [@"Library/Logs/" stringByAppendingFormat:@"%s.log", filename]]; - freopen([log_path fileSystemRepresentation], "a", stdout); - freopen([log_path fileSystemRepresentation], "a", stderr); - [pool release]; -} - static bool bundle_started_from_finder(char **argv) { NSString *binary_path = [NSString stringWithUTF8String:argv[0]]; @@ -381,7 +371,6 @@ int cocoa_main(int argc, char *argv[]) if (bundle_started_from_finder(argv)) { setup_bundle(&argc, argv); - macosx_redirect_output_to_logfile("mpv"); init_cocoa_application(true); } else { for (int i = 1; i < argc; i++) -- cgit v1.2.3