Skip to content

Commit

Permalink
Add some basic logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Ferenc Hammerl committed Oct 22, 2020
1 parent d151b14 commit 2f5c577
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
15 changes: 8 additions & 7 deletions ExpenseTracker.Api/ExpenseTracker.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
<TargetFramework>netcoreapp3.1</TargetFramework>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.1.9">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="3.1.9" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="5.5.0" />
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="3.1.9">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="3.1.9" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="5.5.0" />
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.13.1" />
</ItemGroup>


Expand Down
2 changes: 2 additions & 0 deletions ExpenseTracker.Api/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ public Startup(IConfiguration configuration, IWebHostEnvironment env)

public void ConfigureServices(IServiceCollection services)
{
services.AddApplicationInsightsTelemetry();

services.AddControllers();
if (env.IsDevelopment() || env.IsProduction()) // TODO: define production datacontext and cors policy
{
Expand Down
3 changes: 3 additions & 0 deletions ExpenseTracker.Api/appsettings.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"ApplicationInsights": {
"InstrumentationKey": "fakekey"
},
"Logging": {
"LogLevel": {
"Default": "Information",
Expand Down

0 comments on commit 2f5c577

Please sign in to comment.