-
Notifications
You must be signed in to change notification settings - Fork 113
ログ出力に関する変更 #148 #225 #226
ログ出力に関する変更 #148 #225 #226
Conversation
using System; | ||
using System.Collections.Generic; | ||
using Covid19Radar.Services.Logs; | ||
using FFImageLoading.Helpers; | ||
using Prism.Logging; | ||
|
||
namespace Covid19Radar.Services | ||
{ | ||
public class FFImageLoadingLogger : IMiniLogger |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
このクラスって今使われていますか?
もし使われていなければ手を付けずに不要なクラスとして削除した方がいいかもしれません。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
このクラスは使われていないという指摘はありましたね。DebugLogger
と同じインターフェースを持っており違いもよく分かりません。廃統合して Logs
名前空間に移転するのが良いのかもしれません。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
このPull Requestでは掲題の「ログ出力」に関するものに限定して、統廃合や移転や削除については別の機会にしましょう。
ひとまず、変更を戻して、ここはレビューをしなくても良いようにするのが良いと思います。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
打消しを行うコミットを(手動で)作成しました。1816508
(DebugLogger
の変更を巻き戻さないため)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
よろしくお願いします
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
/* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */ | ||
|
||
using FFImageLoading.Helpers; | ||
using Prism.Logging; | ||
using System; | ||
using System.Collections.Generic; | ||
using Covid19Radar.Services.Logs; | ||
using FFImageLoading.Helpers; | ||
using Prism.Logging; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
このファイルについてはdiffが出ないようにしておいて欲しいので、このあたりも打ち消しお願いします!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
すみません。手動で書き換えたので見落としていました。
private ILogger _logger { get; } | ||
private readonly ILogger _logger; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ここも、消したら一緒なので戻しておいてください
差分を無くすためにBOMを追加しましたが、不要でしたら取り消します。 |
FFImageLoadingLogger.cs 自体は #115 で削除対象に含まれているようですね。 |
#115 に既に含まれているのであれば #225 で話していた Issue は建てる必要は無さそうですね。 @keiji さん |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DebugLogger
を改善しました。ご確認お願い致します。
private ILoggerService? GetLogger() | ||
{ | ||
if (_logger is null) { | ||
_logger = DependencyService.Resolve<ILoggerService>(); | ||
} | ||
return _logger; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
最初はコンストラクタから ILoggerService
を受け取っていましたが、ビルドエラーが発生したため DependencyService.Resolve<T>()
を使ってサービスを取得する様に変更しました。しかし、初期化前のタイミングでは DependencyService.Resolve<T>()
は null
を返していましたので、最初のログ出力時に取得する様に変更しました。
#225 でも書きましたが、 |
ブランチの向き先変更しました。 |
ありがとうございます。 |
CI が一部失敗している様ですので後程確認します。 |
修正しました。 |
af44703
to
9ada1f7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Issue 番号
目的
DebugLogger
/FFImageLoadingLogger
のログ出力先をLoggerService
に変更しました。破壊的変更をもたらしますか
Pull Request の種類
コードの入手
確認事項
その他