14
9

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

iOS10 で CoreData の SQLDebugログ が出力されない

Last updated at Posted at 2016-09-26

CoreDataはiOS10でログ出力先がNSLogからos_log/stderrに変わったらしい。その影響で
-com.apple.CoreData.SQLDebug 1を指定していてもconsoleにSQLiteのログが出力されない。

その場合は起動時引数に-com.apple.CoreData.Logging.stderr 1を追加してやればOK。

スクリーンショット 2016-09-26 15.34.50.png

参考
https://forums.developer.apple.com/thread/63315

↑のスレ見て、-com.apple.CoreData.Logging.stderr 1に書き換えればいいのね、と早とちりしてしまった。正しくは書き換えるのではなく、両方指定する必要がある。

14
9
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
14
9

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?