Skip to content

Commit d14575a

Browse files
Merge pull request #53 from BlazorExtensions/blazorrc1
feat: update to blazor rc1
2 parents 7bfa62e + 24d5d48 commit d14575a

34 files changed

+3201
-4926
lines changed

.github/workflows/ci.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ jobs:
1515
- name: Setup .NET Core
1616
uses: actions/setup-dotnet@v1
1717
with:
18-
dotnet-version: 3.1.100-preview1-014459
18+
dotnet-version: 3.1.201
1919
- name: Build
20-
run: dotnet build --configuration Release
20+
run: dotnet build --configuration Release

.github/workflows/publish.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Setup .NET Core
1616
uses: actions/setup-dotnet@v1
1717
with:
18-
dotnet-version: 3.1.100-preview1-014459
18+
dotnet-version: 3.1.201
1919
- name: Build
2020
run: dotnet build --configuration Release
2121
- name: Pack

Directory.Build.props

+74-68
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,74 @@
1-
<Project>
2-
<!-- Set common properties regarding assembly information and nuget packages -->
3-
<PropertyGroup>
4-
<Authors>Blazor Extensions Contributors</Authors>
5-
<Product>Blazor Extensions</Product>
6-
<Copyright>(c) Blazor Extensions Contributors. All rights reserved.</Copyright>
7-
<PackageLicenseUrl>https://github.com/BlazorExtensions/Logging#license</PackageLicenseUrl>
8-
<PackageProjectUrl>https://github.com/BlazorExtensions/Logging</PackageProjectUrl>
9-
<PackageIconUrl>https://avatars2.githubusercontent.com/u/38994076?s%3D128%26v%3D4</PackageIconUrl>
10-
<PackageTags>Microsoft ASP.NET Core Blazor Extensions Logging</PackageTags>
11-
<PackageReleaseNotes></PackageReleaseNotes>
12-
<RepositoryUrl>https://github.com/BlazorExtensions/Logging</RepositoryUrl>
13-
<RepositoryType>git</RepositoryType>
14-
<IncludeSymbols>true</IncludeSymbols>
15-
</PropertyGroup>
16-
17-
<!-- Common compile parameters -->
18-
<PropertyGroup>
19-
<LangVersion>latest</LangVersion>
20-
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
21-
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
22-
<!-- We use full (Windows PDBs) until cross platform support for source link will get better -->
23-
<DebugType>full</DebugType>
24-
</PropertyGroup>
25-
26-
<PropertyGroup>
27-
<TargetFramework>netstandard2.0</TargetFramework>
28-
<TestProjectTargetFramework>netstandard2.0</TestProjectTargetFramework>
29-
</PropertyGroup>
30-
31-
<!-- Versioning properties -->
32-
<PropertyGroup>
33-
<VersionPrefix Condition=" '$(VersionPrefix)'=='' ">3.1.0</VersionPrefix>
34-
<VersionSuffix Condition=" '$(VersionSuffix)'=='' ">preview1-014459</VersionSuffix>
35-
</PropertyGroup>
36-
37-
<Choose>
38-
<When Condition="'$(OfficialBuild)' != 'true'">
39-
<!-- On non-official builds we don't burn in a git sha. In large part because it
40-
hurts our determinism efforts as binaries which should be the same between
41-
builds will not (due to developers building against different HEAD
42-
values -->
43-
<PropertyGroup>
44-
<GitHeadSha>&lt;developer build&gt;</GitHeadSha>
45-
</PropertyGroup>
46-
</When>
47-
<When Condition="'$(BUILD_SOURCEVERSION)' != ''">
48-
<PropertyGroup>
49-
<GitHeadSha>$(BUILD_SOURCEVERSION)</GitHeadSha>
50-
</PropertyGroup>
51-
</When>
52-
<When Condition="'$(BUILD_SOURCEVERSION)' == '' AND '$(GIT_COMMIT)' != ''">
53-
<PropertyGroup>
54-
<GitHeadSha>$(GIT_COMMIT)</GitHeadSha>
55-
</PropertyGroup>
56-
</When>
57-
<Otherwise>
58-
<PropertyGroup>
59-
<GitHeadSha>Not found</GitHeadSha>
60-
<DotGitDir>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory).git'))</DotGitDir>
61-
<HeadFileContent Condition="Exists('$(DotGitDir)/HEAD')">$([System.IO.File]::ReadAllText('$(DotGitDir)/HEAD').Trim())</HeadFileContent>
62-
<RefPath Condition="$(HeadFileContent.StartsWith('ref: '))">$(DotGitDir)/$(HeadFileContent.Substring(5))</RefPath>
63-
<GitHeadSha Condition="'$(RefPath)' != '' AND Exists('$(RefPath)')">$([System.IO.File]::ReadAllText('$(RefPath)').Trim())</GitHeadSha>
64-
<GitHeadSha Condition="'$(HeadFileContent)' != '' AND '$(RefPath)' == ''">$(HeadFileContent)</GitHeadSha>
65-
</PropertyGroup>
66-
</Otherwise>
67-
</Choose>
68-
</Project>
1+
<Project>
2+
<!-- Set common properties regarding assembly information and nuget packages -->
3+
<PropertyGroup>
4+
<Authors>Blazor Extensions Contributors</Authors>
5+
<Product>Blazor Extensions</Product>
6+
<Copyright>(c) Blazor Extensions Contributors. All rights reserved.</Copyright>
7+
<PackageLicense>LICENSE</PackageLicense>
8+
<PackageLicenseExpression>MIT</PackageLicenseExpression>
9+
<PackageProjectUrl>https://github.com/BlazorExtensions/Logging</PackageProjectUrl>
10+
<PackageIcon>BlazorExtensions.png</PackageIcon>
11+
<PackageTags>Microsoft ASP.NET Core Blazor Extensions Logging</PackageTags>
12+
<PackageReleaseNotes></PackageReleaseNotes>
13+
<RepositoryUrl>https://github.com/BlazorExtensions/Logging</RepositoryUrl>
14+
<RepositoryType>git</RepositoryType>
15+
<IncludeSymbols>true</IncludeSymbols>
16+
</PropertyGroup>
17+
18+
<ItemGroup>
19+
<None Include="BlazorExtensions.png" Pack="true" PackagePath=""/>
20+
<None Include="../../LICENSE" Pack="true" PackagePath=""/>
21+
</ItemGroup>
22+
23+
<!-- Common compile parameters -->
24+
<PropertyGroup>
25+
<LangVersion>latest</LangVersion>
26+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
27+
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
28+
<!-- We use full (Windows PDBs) until cross platform support for source link will get better -->
29+
<DebugType>full</DebugType>
30+
</PropertyGroup>
31+
32+
<PropertyGroup>
33+
<TargetFramework>netstandard2.1</TargetFramework>
34+
<TestProjectTargetFramework>netstandard2.1</TestProjectTargetFramework>
35+
</PropertyGroup>
36+
37+
<!-- Versioning properties -->
38+
<PropertyGroup>
39+
<VersionPrefix Condition=" '$(VersionPrefix)'=='' ">3.1.0</VersionPrefix>
40+
<VersionSuffix Condition=" '$(VersionSuffix)'=='' ">rc1-020501</VersionSuffix>
41+
</PropertyGroup>
42+
43+
<Choose>
44+
<When Condition="'$(OfficialBuild)' != 'true'">
45+
<!-- On non-official builds we don't burn in a git sha. In large part because it
46+
hurts our determinism efforts as binaries which should be the same between
47+
builds will not (due to developers building against different HEAD
48+
values -->
49+
<PropertyGroup>
50+
<GitHeadSha>&lt;developer build&gt;</GitHeadSha>
51+
</PropertyGroup>
52+
</When>
53+
<When Condition="'$(BUILD_SOURCEVERSION)' != ''">
54+
<PropertyGroup>
55+
<GitHeadSha>$(BUILD_SOURCEVERSION)</GitHeadSha>
56+
</PropertyGroup>
57+
</When>
58+
<When Condition="'$(BUILD_SOURCEVERSION)' == '' AND '$(GIT_COMMIT)' != ''">
59+
<PropertyGroup>
60+
<GitHeadSha>$(GIT_COMMIT)</GitHeadSha>
61+
</PropertyGroup>
62+
</When>
63+
<Otherwise>
64+
<PropertyGroup>
65+
<GitHeadSha>Not found</GitHeadSha>
66+
<DotGitDir>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory).git'))</DotGitDir>
67+
<HeadFileContent Condition="Exists('$(DotGitDir)/HEAD')">$([System.IO.File]::ReadAllText('$(DotGitDir)/HEAD').Trim())</HeadFileContent>
68+
<RefPath Condition="$(HeadFileContent.StartsWith('ref: '))">$(DotGitDir)/$(HeadFileContent.Substring(5))</RefPath>
69+
<GitHeadSha Condition="'$(RefPath)' != '' AND Exists('$(RefPath)')">$([System.IO.File]::ReadAllText('$(RefPath)').Trim())</GitHeadSha>
70+
<GitHeadSha Condition="'$(HeadFileContent)' != '' AND '$(RefPath)' == ''">$(HeadFileContent)</GitHeadSha>
71+
</PropertyGroup>
72+
</Otherwise>
73+
</Choose>
74+
</Project>

Logging.sln

+67-83
Original file line numberDiff line numberDiff line change
@@ -1,83 +1,67 @@
1-
2-
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio Version 16
4-
VisualStudioVersion = 16.0.28822.285
5-
MinimumVisualStudioVersion = 15.0.26124.0
6-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{B286BCBD-DAD8-4DE7-9334-3DE18DF233AF}"
7-
EndProject
8-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{20DAA632-F8AD-4C5F-9E5F-FC82B7CB56A7}"
9-
EndProject
10-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Blazor.Extensions.Logging", "src\Blazor.Extensions.Logging\Blazor.Extensions.Logging.csproj", "{9378C7BF-0899-4835-B8FB-099292C8C63D}"
11-
EndProject
12-
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{8A34FDEB-D488-4AE3-887B-8254B33C7A13}"
13-
ProjectSection(SolutionItems) = preProject
14-
.vsts-ci.yml = .vsts-ci.yml
15-
.vsts-release.yml = .vsts-release.yml
16-
Directory.Build.props = Directory.Build.props
17-
Directory.Build.targets = Directory.Build.targets
18-
README.md = README.md
19-
EndProjectSection
20-
EndProject
21-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Blazor.Extensions.Logging.Test", "test\Blazor.Extensions.Logging.Test\Blazor.Extensions.Logging.Test.csproj", "{C4BB6A39-28E6-454D-8679-92562CEAD0A9}"
22-
EndProject
23-
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Blazor.Extensions.Logging.JS", "src\Blazor.Extensions.Logging.JS\Blazor.Extensions.Logging.JS.csproj", "{1C49147F-7C73-4962-A71C-6A193970D058}"
24-
EndProject
25-
Global
26-
GlobalSection(SolutionConfigurationPlatforms) = preSolution
27-
Debug|Any CPU = Debug|Any CPU
28-
Debug|x64 = Debug|x64
29-
Debug|x86 = Debug|x86
30-
Release|Any CPU = Release|Any CPU
31-
Release|x64 = Release|x64
32-
Release|x86 = Release|x86
33-
EndGlobalSection
34-
GlobalSection(ProjectConfigurationPlatforms) = postSolution
35-
{9378C7BF-0899-4835-B8FB-099292C8C63D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
36-
{9378C7BF-0899-4835-B8FB-099292C8C63D}.Debug|Any CPU.Build.0 = Debug|Any CPU
37-
{9378C7BF-0899-4835-B8FB-099292C8C63D}.Debug|x64.ActiveCfg = Debug|Any CPU
38-
{9378C7BF-0899-4835-B8FB-099292C8C63D}.Debug|x64.Build.0 = Debug|Any CPU
39-
{9378C7BF-0899-4835-B8FB-099292C8C63D}.Debug|x86.ActiveCfg = Debug|Any CPU
40-
{9378C7BF-0899-4835-B8FB-099292C8C63D}.Debug|x86.Build.0 = Debug|Any CPU
41-
{9378C7BF-0899-4835-B8FB-099292C8C63D}.Release|Any CPU.ActiveCfg = Release|Any CPU
42-
{9378C7BF-0899-4835-B8FB-099292C8C63D}.Release|Any CPU.Build.0 = Release|Any CPU
43-
{9378C7BF-0899-4835-B8FB-099292C8C63D}.Release|x64.ActiveCfg = Release|Any CPU
44-
{9378C7BF-0899-4835-B8FB-099292C8C63D}.Release|x64.Build.0 = Release|Any CPU
45-
{9378C7BF-0899-4835-B8FB-099292C8C63D}.Release|x86.ActiveCfg = Release|Any CPU
46-
{9378C7BF-0899-4835-B8FB-099292C8C63D}.Release|x86.Build.0 = Release|Any CPU
47-
{C4BB6A39-28E6-454D-8679-92562CEAD0A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
48-
{C4BB6A39-28E6-454D-8679-92562CEAD0A9}.Debug|Any CPU.Build.0 = Debug|Any CPU
49-
{C4BB6A39-28E6-454D-8679-92562CEAD0A9}.Debug|x64.ActiveCfg = Debug|Any CPU
50-
{C4BB6A39-28E6-454D-8679-92562CEAD0A9}.Debug|x64.Build.0 = Debug|Any CPU
51-
{C4BB6A39-28E6-454D-8679-92562CEAD0A9}.Debug|x86.ActiveCfg = Debug|Any CPU
52-
{C4BB6A39-28E6-454D-8679-92562CEAD0A9}.Debug|x86.Build.0 = Debug|Any CPU
53-
{C4BB6A39-28E6-454D-8679-92562CEAD0A9}.Release|Any CPU.ActiveCfg = Release|Any CPU
54-
{C4BB6A39-28E6-454D-8679-92562CEAD0A9}.Release|Any CPU.Build.0 = Release|Any CPU
55-
{C4BB6A39-28E6-454D-8679-92562CEAD0A9}.Release|x64.ActiveCfg = Release|Any CPU
56-
{C4BB6A39-28E6-454D-8679-92562CEAD0A9}.Release|x64.Build.0 = Release|Any CPU
57-
{C4BB6A39-28E6-454D-8679-92562CEAD0A9}.Release|x86.ActiveCfg = Release|Any CPU
58-
{C4BB6A39-28E6-454D-8679-92562CEAD0A9}.Release|x86.Build.0 = Release|Any CPU
59-
{1C49147F-7C73-4962-A71C-6A193970D058}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
60-
{1C49147F-7C73-4962-A71C-6A193970D058}.Debug|Any CPU.Build.0 = Debug|Any CPU
61-
{1C49147F-7C73-4962-A71C-6A193970D058}.Debug|x64.ActiveCfg = Debug|Any CPU
62-
{1C49147F-7C73-4962-A71C-6A193970D058}.Debug|x64.Build.0 = Debug|Any CPU
63-
{1C49147F-7C73-4962-A71C-6A193970D058}.Debug|x86.ActiveCfg = Debug|Any CPU
64-
{1C49147F-7C73-4962-A71C-6A193970D058}.Debug|x86.Build.0 = Debug|Any CPU
65-
{1C49147F-7C73-4962-A71C-6A193970D058}.Release|Any CPU.ActiveCfg = Release|Any CPU
66-
{1C49147F-7C73-4962-A71C-6A193970D058}.Release|Any CPU.Build.0 = Release|Any CPU
67-
{1C49147F-7C73-4962-A71C-6A193970D058}.Release|x64.ActiveCfg = Release|Any CPU
68-
{1C49147F-7C73-4962-A71C-6A193970D058}.Release|x64.Build.0 = Release|Any CPU
69-
{1C49147F-7C73-4962-A71C-6A193970D058}.Release|x86.ActiveCfg = Release|Any CPU
70-
{1C49147F-7C73-4962-A71C-6A193970D058}.Release|x86.Build.0 = Release|Any CPU
71-
EndGlobalSection
72-
GlobalSection(SolutionProperties) = preSolution
73-
HideSolutionNode = FALSE
74-
EndGlobalSection
75-
GlobalSection(NestedProjects) = preSolution
76-
{9378C7BF-0899-4835-B8FB-099292C8C63D} = {B286BCBD-DAD8-4DE7-9334-3DE18DF233AF}
77-
{C4BB6A39-28E6-454D-8679-92562CEAD0A9} = {20DAA632-F8AD-4C5F-9E5F-FC82B7CB56A7}
78-
{1C49147F-7C73-4962-A71C-6A193970D058} = {B286BCBD-DAD8-4DE7-9334-3DE18DF233AF}
79-
EndGlobalSection
80-
GlobalSection(ExtensibilityGlobals) = postSolution
81-
SolutionGuid = {A97C0A4B-E309-4485-BB76-898B37BFBFFF}
82-
EndGlobalSection
83-
EndGlobal
1+
Microsoft Visual Studio Solution File, Format Version 12.00
2+
# Visual Studio Version 16
3+
VisualStudioVersion = 16.0.28822.285
4+
MinimumVisualStudioVersion = 15.0.26124.0
5+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{B286BCBD-DAD8-4DE7-9334-3DE18DF233AF}"
6+
EndProject
7+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{20DAA632-F8AD-4C5F-9E5F-FC82B7CB56A7}"
8+
EndProject
9+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Blazor.Extensions.Logging", "src\Blazor.Extensions.Logging\Blazor.Extensions.Logging.csproj", "{9378C7BF-0899-4835-B8FB-099292C8C63D}"
10+
EndProject
11+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{8A34FDEB-D488-4AE3-887B-8254B33C7A13}"
12+
ProjectSection(SolutionItems) = preProject
13+
.vsts-ci.yml = .vsts-ci.yml
14+
.vsts-release.yml = .vsts-release.yml
15+
Directory.Build.props = Directory.Build.props
16+
Directory.Build.targets = Directory.Build.targets
17+
README.md = README.md
18+
EndProjectSection
19+
EndProject
20+
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Blazor.Extensions.Logging.Test", "test\Blazor.Extensions.Logging.Test\Blazor.Extensions.Logging.Test.csproj", "{C4BB6A39-28E6-454D-8679-92562CEAD0A9}"
21+
EndProject
22+
Global
23+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
24+
Debug|Any CPU = Debug|Any CPU
25+
Debug|x64 = Debug|x64
26+
Debug|x86 = Debug|x86
27+
Release|Any CPU = Release|Any CPU
28+
Release|x64 = Release|x64
29+
Release|x86 = Release|x86
30+
EndGlobalSection
31+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
32+
{9378C7BF-0899-4835-B8FB-099292C8C63D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
33+
{9378C7BF-0899-4835-B8FB-099292C8C63D}.Debug|Any CPU.Build.0 = Debug|Any CPU
34+
{9378C7BF-0899-4835-B8FB-099292C8C63D}.Debug|x64.ActiveCfg = Debug|Any CPU
35+
{9378C7BF-0899-4835-B8FB-099292C8C63D}.Debug|x64.Build.0 = Debug|Any CPU
36+
{9378C7BF-0899-4835-B8FB-099292C8C63D}.Debug|x86.ActiveCfg = Debug|Any CPU
37+
{9378C7BF-0899-4835-B8FB-099292C8C63D}.Debug|x86.Build.0 = Debug|Any CPU
38+
{9378C7BF-0899-4835-B8FB-099292C8C63D}.Release|Any CPU.ActiveCfg = Release|Any CPU
39+
{9378C7BF-0899-4835-B8FB-099292C8C63D}.Release|Any CPU.Build.0 = Release|Any CPU
40+
{9378C7BF-0899-4835-B8FB-099292C8C63D}.Release|x64.ActiveCfg = Release|Any CPU
41+
{9378C7BF-0899-4835-B8FB-099292C8C63D}.Release|x64.Build.0 = Release|Any CPU
42+
{9378C7BF-0899-4835-B8FB-099292C8C63D}.Release|x86.ActiveCfg = Release|Any CPU
43+
{9378C7BF-0899-4835-B8FB-099292C8C63D}.Release|x86.Build.0 = Release|Any CPU
44+
{C4BB6A39-28E6-454D-8679-92562CEAD0A9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
45+
{C4BB6A39-28E6-454D-8679-92562CEAD0A9}.Debug|Any CPU.Build.0 = Debug|Any CPU
46+
{C4BB6A39-28E6-454D-8679-92562CEAD0A9}.Debug|x64.ActiveCfg = Debug|Any CPU
47+
{C4BB6A39-28E6-454D-8679-92562CEAD0A9}.Debug|x64.Build.0 = Debug|Any CPU
48+
{C4BB6A39-28E6-454D-8679-92562CEAD0A9}.Debug|x86.ActiveCfg = Debug|Any CPU
49+
{C4BB6A39-28E6-454D-8679-92562CEAD0A9}.Debug|x86.Build.0 = Debug|Any CPU
50+
{C4BB6A39-28E6-454D-8679-92562CEAD0A9}.Release|Any CPU.ActiveCfg = Release|Any CPU
51+
{C4BB6A39-28E6-454D-8679-92562CEAD0A9}.Release|Any CPU.Build.0 = Release|Any CPU
52+
{C4BB6A39-28E6-454D-8679-92562CEAD0A9}.Release|x64.ActiveCfg = Release|Any CPU
53+
{C4BB6A39-28E6-454D-8679-92562CEAD0A9}.Release|x64.Build.0 = Release|Any CPU
54+
{C4BB6A39-28E6-454D-8679-92562CEAD0A9}.Release|x86.ActiveCfg = Release|Any CPU
55+
{C4BB6A39-28E6-454D-8679-92562CEAD0A9}.Release|x86.Build.0 = Release|Any CPU
56+
EndGlobalSection
57+
GlobalSection(SolutionProperties) = preSolution
58+
HideSolutionNode = FALSE
59+
EndGlobalSection
60+
GlobalSection(NestedProjects) = preSolution
61+
{9378C7BF-0899-4835-B8FB-099292C8C63D} = {B286BCBD-DAD8-4DE7-9334-3DE18DF233AF}
62+
{C4BB6A39-28E6-454D-8679-92562CEAD0A9} = {20DAA632-F8AD-4C5F-9E5F-FC82B7CB56A7}
63+
EndGlobalSection
64+
GlobalSection(ExtensibilityGlobals) = postSolution
65+
SolutionGuid = {A97C0A4B-E309-4485-BB76-898B37BFBFFF}
66+
EndGlobalSection
67+
EndGlobal

README.md

+12-8
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,20 @@ Some of the log levels are not available as distinct methods in the browser's de
4040

4141
## Setup
4242

43-
The following snippet shows how to setup the browser console logger by registering it for dependency injection in the ```Startup.cs``` of the application.
43+
The following snippet shows how to setup the browser console logger by registering it for dependency injection in the ```Program.cs``` of the application.
4444

4545
```c#
46-
public void ConfigureServices(IServiceCollection services)
47-
{
48-
services.AddLogging(builder => builder
49-
.AddBrowserConsole() // Add Blazor.Extensions.Logging.BrowserConsoleLogger
50-
.SetMinimumLevel(LogLevel.Trace)
51-
);
52-
}
46+
// Add Blazor.Extensions.Logging.BrowserConsoleLogger
47+
builder.Services.AddLogging(builder => builder
48+
.AddBrowserConsole()
49+
.SetMinimumLevel(LogLevel.Trace)
50+
);
51+
```
52+
53+
Add the ```script``` tag to ```wwwroot/index.html```.
54+
55+
```html
56+
<script src="_content/Blazor.Extensions.Logging/blazor.extensions.logging.js" defer></script>
5357
```
5458

5559
## Usage

src/Blazor.Extensions.Logging.JS/Blazor.Extensions.Logging.JS.csproj

-33
This file was deleted.

0 commit comments

Comments
 (0)