# Logging, Monitoring & Observability (.NET) > ILogger、Serilog、Application Insights、OpenTelemetry(トレース、メトリクス)、ヘルスチェック、構造化 logging - 22 面接問題 - Mid-Level - [面接問題: .NET](https://sharpskill.dev/ja/technologies/dotnet/interview-questions.md) ## 1. .NET の ILogger インターフェースとは何ですか? **回答** ILogger は Microsoft.Extensions.Logging が提供する標準的な logging インターフェースです。さまざまな重大度レベルでメッセージを記録するための統一された契約を定義し、具体的な logging システムの実装を抽象化できます。この抽象化により、アプリケーションコードを変更せずにログプロバイダーを切り替えることが容易になり、依存性注入によるユニットテストが促進されます。 ## 2. ILogger で利用できるログレベルを、低いものから高いものへ並べると何ですか? **回答** ILogger は順序付けされた 6 つの重大度レベルを定義します。詳細なデバッグ用の Trace、開発情報用の Debug、アプリケーションの通常フロー用の Information、ブロックしない異常な状況用の Warning、回復可能なエラー用の Error、即時対応が必要なシステム障害用の Critical です。この階層により、環境に応じてログをフィルタリングできます。 ## 3. LogLevel.Debug と LogLevel.Trace の主な違いは何ですか? **回答** Trace は最も詳細なレベルで、行単位の実行フローのような非常に詳しい診断情報を対象とします。一方 Debug は開発に役立つが粒度の低い情報を含みます。本番環境では通常どちらも無効化されますが、Trace ははるかに多くの量を生成し、誤用すると開発環境でもパフォーマンスに影響を与える可能性があります。 ## さらに19問利用可能 - .NET でサービスクラスに ILogger を注入するにはどうすればよいですか? - structured logging とは何で、どのような利点をもたらしますか? 無料で登録: https://sharpskill.dev/ja/login ## その他の.NET面接トピック - [C# の基礎](https://sharpskill.dev/ja/technologies/dotnet/interview-questions/csharp-basics.md): 25問, Junior - [LINQ & Delegates](https://sharpskill.dev/ja/technologies/dotnet/interview-questions/csharp-linq-delegates.md): 20問, Junior - [C#言語の基礎](https://sharpskill.dev/ja/technologies/dotnet/interview-questions/csharp-language-essentials.md): 15問, Junior - [ASP.NET Core の基礎](https://sharpskill.dev/ja/technologies/dotnet/interview-questions/aspnet-core-fundamentals.md): 18問, Junior - [ASP.NET Core のリクエストライフサイクル](https://sharpskill.dev/ja/technologies/dotnet/interview-questions/aspnet-core-request-lifecycle.md): 20問, Junior - [Configuration & Settings](https://sharpskill.dev/ja/technologies/dotnet/interview-questions/configuration-settings.md): 20問, Junior - [アプリケーションのライフサイクル](https://sharpskill.dev/ja/technologies/dotnet/interview-questions/application-lifecycle.md): 20問, Junior - [Dependency Injection](https://sharpskill.dev/ja/technologies/dotnet/interview-questions/dependency-injection.md): 24問, Mid-Level - [Entity Framework Core](https://sharpskill.dev/ja/technologies/dotnet/interview-questions/entity-framework-core.md): 25問, Mid-Level - [Minimal APIs](https://sharpskill.dev/ja/technologies/dotnet/interview-questions/minimal-apis.md): 18問, Mid-Level - [Web API開発](https://sharpskill.dev/ja/technologies/dotnet/interview-questions/web-api-development.md): 22問, Mid-Level - [ASP.NET Core における Async](https://sharpskill.dev/ja/technologies/dotnet/interview-questions/async-aspnet-core.md): 20問, Mid-Level - [Authentication & Authorization](https://sharpskill.dev/ja/technologies/dotnet/interview-questions/authentication-authorization.md): 18問, Mid-Level - [HttpClient & ネットワーキング](https://sharpskill.dev/ja/technologies/dotnet/interview-questions/httpclient-networking.md): 20問, Mid-Level - [JSONシリアライズ](https://sharpskill.dev/ja/technologies/dotnet/interview-questions/json-serialization.md): 20問, Mid-Level - [Entity Framework Core 応用](https://sharpskill.dev/ja/technologies/dotnet/interview-questions/ef-core-advanced.md): 25問, Mid-Level - [C# の高度な機能](https://sharpskill.dev/ja/technologies/dotnet/interview-questions/csharp-advanced-features.md): 20問, Mid-Level - [Clean Architecture](https://sharpskill.dev/ja/technologies/dotnet/interview-questions/clean-architecture.md): 20問, Mid-Level - [ユニットテストとxUnit](https://sharpskill.dev/ja/technologies/dotnet/interview-questions/unit-testing-xunit.md): 20問, Mid-Level - [統合テスト](https://sharpskill.dev/ja/technologies/dotnet/interview-questions/integration-testing.md): 18問, Mid-Level - [Docker & Containerization](https://sharpskill.dev/ja/technologies/dotnet/interview-questions/docker-containerization.md): 16問, Mid-Level - [NuGet パッケージ管理](https://sharpskill.dev/ja/technologies/dotnet/interview-questions/nuget-package-management.md): 16問, Mid-Level - [Memory Management & GC](https://sharpskill.dev/ja/technologies/dotnet/interview-questions/memory-management-gc.md): 22問, Senior - [リアクティブプログラミング](https://sharpskill.dev/ja/technologies/dotnet/interview-questions/reactive-programming.md): 24問, Senior - [Async/await とパターン](https://sharpskill.dev/ja/technologies/dotnet/interview-questions/async-await-patterns.md): 26問, Senior - [.NET デザインパターン](https://sharpskill.dev/ja/technologies/dotnet/interview-questions/dotnet-design-patterns.md): 24問, Senior - [パフォーマンス最適化](https://sharpskill.dev/ja/technologies/dotnet/interview-questions/performance-optimization.md): 22問, Senior - [セキュリティとベストプラクティス](https://sharpskill.dev/ja/technologies/dotnet/interview-questions/security-best-practices.md): 24問, Senior - [SignalR とリアルタイム](https://sharpskill.dev/ja/technologies/dotnet/interview-questions/signalr-realtime.md): 22問, Senior - [マイクロサービスアーキテクチャ](https://sharpskill.dev/ja/technologies/dotnet/interview-questions/microservices-architecture.md): 25問, Senior --- Source: SharpSkill (https://sharpskill.dev), tech interview preparation for your real stack. HTML version of this page: https://sharpskill.dev/ja/technologies/dotnet/interview-questions/logging-monitoring