マルチスレッド プロジェクトのすべてのログ メッセージを変換して、Apple システム ログ機能 (または asl) を使用したいと考えています。
次の asl マニュアルによると - https://developer.apple.com/library/ios/documentation/System/Conceptual/ManPages_iPhoneOS/man3/asl_get.3.html
複数のスレッドからログを記録する場合、各スレッドは asl_open を使用して個別のクライアント ハンドルを開く必要があります。
そのため、すべてのログ コマンドで使用するスレッドごとに asl クライアントを定義しました。ただし、aslクライアントを各asl_logコマンドにバインドする際にいくつかの大きな問題に直面しています。
1. what if some of my asl log commands reside in a code that is common for
more than one thread - which asl client should i decide use on such message.
2. Even on thread unique code, one should be consistent in choosing the same
asl_client on all log functions on a single thread code scope (this is
not always easy to find in complex projects.).
私のプロジェクトのロギング メッセージを採用して asl を使用する簡単な方法はありますか?
aslクライアントをスレッドにバインドするようなことを考えますが、
ありがとう