Serilog
This commit is contained in:
parent
e4569be9c6
commit
e7e092cadc
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -288,3 +288,4 @@ __pycache__/
|
|||
*.bin
|
||||
/src/WebStarter/data/conversations
|
||||
XMLs
|
||||
logs
|
||||
|
|
|
|||
|
|
@ -7,9 +7,18 @@ using BotSharp.Plugin.ChatHub;
|
|||
using Microsoft.AspNetCore.Authentication.JwtBearer;
|
||||
using Microsoft.IdentityModel.Tokens;
|
||||
using System.Text;
|
||||
using Serilog;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
Log.Logger = new LoggerConfiguration()
|
||||
.MinimumLevel.Debug()
|
||||
.WriteTo.Console()
|
||||
.WriteTo.File("logs/log-.txt", rollingInterval: RollingInterval.Day)
|
||||
.CreateLogger();
|
||||
|
||||
builder.Host.UseSerilog(Log.Logger);
|
||||
|
||||
builder.Services.AddScoped<IUserIdentity, UserIdentity>();
|
||||
// Add bearer authentication
|
||||
builder.Services.AddAuthentication(options =>
|
||||
|
|
@ -40,7 +49,8 @@ builder.Services.AddCors(options =>
|
|||
{
|
||||
options.AddPolicy("MyCorsPolicy",
|
||||
builder => builder.WithOrigins("http://localhost:5015",
|
||||
"https://botsharp.scisharpstack.org")
|
||||
"https://botsharp.scisharpstack.org",
|
||||
"https://chat.scisharpstack.org")
|
||||
.AllowAnyMethod()
|
||||
.AllowAnyHeader()
|
||||
.AllowCredentials());
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
},
|
||||
"dotnetRunMessages": true,
|
||||
"applicationUrl": "http://localhost:5500"
|
||||
"applicationUrl": "http://0.0.0.0:5500"
|
||||
},
|
||||
"IIS Express": {
|
||||
"commandName": "IISExpress",
|
||||
|
|
|
|||
|
|
@ -24,24 +24,18 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="data\models\dbpedia.ftz" />
|
||||
<None Remove="data\models\intent-classifier.h5" />
|
||||
<None Remove="data\models\label.txt" />
|
||||
<Compile Remove="logs\**" />
|
||||
<Content Remove="logs\**" />
|
||||
<EmbeddedResource Remove="logs\**" />
|
||||
<None Remove="logs\**" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="data\models\dbpedia.ftz">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="data\models\intent-classifier.h5">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="data\models\label.txt">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Serilog.Sinks.Console" Version="5.0.1" />
|
||||
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
|
||||
<PackageReference Include="Serilog.Extensions.Hosting" Version="8.0.0" />
|
||||
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.19.5" />
|
||||
</ItemGroup>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue