-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
logger のロケーションプレフィックス対応 #21
Comments
location-prefix ブランチで対応 追記: |
テストがない |
テストを追加したが、一方で C++20 なら |
https://github.com/project-tsurugi/tateyama/blob/master/src/tateyama/endpoint/common/logging_helper.h |
対応したのですが、 |
古典的には C マクロで複文に展開するには MACRO(x) << something; の文法には対応できない。 #define MACRO(x) if (init; false) {} else stmt |
以下のような使い方をすると、ぶら下がりelse 警告が出るようになるが、実装上の制限事項としたい。 if (cond) LOG_LP(x) << "message"; workaround は if (cond) { LOG_LP(x) << "message"; } 正確に言うと、ぶら下がりelseの解釈が違う実装では意図通りに動かない可能性があるが、試した処理系すべてで |
公開 api include の logging.h 中に足していたのを、新ファイルとして独立して src 下に移動した。 あと、先述した ぶらさがり else の挙動(内側の if につく)は、実装依存ではなく、仕様のようだ。 |
operator オーバーロード 関数や lambda 対応したバージョンは作成中だが、 |
operator オーバーロード と キャスト と lambda 対応をした ver.2 を(数日前に) push した。 ドキュメント: 懸念点: |
jogasaki docs/logging_policy.md#ロケーションプレフィックス の更新に対応する
The text was updated successfully, but these errors were encountered: