I have a project cite 3rd-party frameworks. in which it use NSLog. I'd like to redirect NSLog to other destination(say Dotzu)
Is it possible to override NSLog in my project?
I have a project cite 3rd-party frameworks. in which it use NSLog. I'd like to redirect NSLog to other destination(say Dotzu)
Is it possible to override NSLog in my project?
Copyright © 2021 Jogjafile Inc.
You cannot overwrite it, because it is a function, not a method. However,
NSLog()additionally writes tostderrunder some conditions as stated in the discussion ofNSLogv(), which is called byNSLog():So simply redirect
STDERR_FILENOusingfreopen().