0

There are two targets in my project, and all of them have used DDlog to print log. I want to save logs into one file with name "A.log". But I found there are two log files "A.log" and "A 2.log" in destination directory. All logs printed by Target One have been saved into "A.log" and all logs printed by Target Two have been saved into "A 2.log". How can I resolve this problem and why?

I found that I have add the static library which contains DDLog for both two targets. One of the two target is Framework, so it seems to add a copy of the static library for the framework target. I delete the link in application target, the problem has been solved.

oguz ismail
  • 1
  • 16
  • 47
  • 69
pingshw
  • 113
  • 2
  • 9

1 Answers1

0

I would set a flag for each target. And then in you're code based on the flag you set the target file to either A.log or A2.log

See https://stackoverflow.com/a/12291251/3810942 for more information

And https://stackoverflow.com/a/6763597/3810942 for build information

Community
  • 1
  • 1
Justin
  • 1,318
  • 9
  • 12