-
-
Notifications
You must be signed in to change notification settings - Fork 158
Expand file tree
/
Copy pathMyTestComponent.cs
More file actions
28 lines (24 loc) · 701 Bytes
/
MyTestComponent.cs
File metadata and controls
28 lines (24 loc) · 701 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
//
// Copyright (c) .NET Foundation and Contributors
// See LICENSE file in the project root for full license information.
//
using System;
using Microsoft.Extensions.Logging;
using nanoFramework.Logging;
namespace Logging
{
internal class MyTestComponent
{
private readonly ILogger _logger;
public MyTestComponent()
{
_logger = this.GetCurrentClassLogger();
}
public void DoSomeLogging()
{
_logger.LogInformation("An informative message");
_logger.LogError("An error situation");
_logger.LogWarning(new Exception("Something is not supported"), "With exception context");
}
}
}