commit
a875a5ad32
3
Oqtane.Server/AssemblyInfo.cs
Normal file
3
Oqtane.Server/AssemblyInfo.cs
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
using Microsoft.Extensions.Localization;
|
||||||
|
|
||||||
|
[assembly: RootNamespace("Oqtane")]
|
@ -1,15 +1,14 @@
|
|||||||
using Oqtane.Shared;
|
|
||||||
using System;
|
using System;
|
||||||
using Oqtane.Models;
|
|
||||||
using System.Text.Json;
|
|
||||||
using Microsoft.Extensions.Configuration;
|
|
||||||
using Microsoft.AspNetCore.Http;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Text.Json;
|
||||||
|
using Microsoft.AspNetCore.Http;
|
||||||
|
using Microsoft.Extensions.Configuration;
|
||||||
|
using Microsoft.Extensions.Localization;
|
||||||
using Oqtane.Enums;
|
using Oqtane.Enums;
|
||||||
|
using Oqtane.Models;
|
||||||
using Oqtane.Repository;
|
using Oqtane.Repository;
|
||||||
using Oqtane.Security;
|
using Oqtane.Security;
|
||||||
// ReSharper disable StringIndexOfIsCultureSpecific.2
|
using Oqtane.Shared;
|
||||||
// ReSharper disable StringIndexOfIsCultureSpecific.1
|
|
||||||
|
|
||||||
namespace Oqtane.Infrastructure
|
namespace Oqtane.Infrastructure
|
||||||
{
|
{
|
||||||
@ -20,14 +19,16 @@ namespace Oqtane.Infrastructure
|
|||||||
private readonly IConfigurationRoot _config;
|
private readonly IConfigurationRoot _config;
|
||||||
private readonly IUserPermissions _userPermissions;
|
private readonly IUserPermissions _userPermissions;
|
||||||
private readonly IHttpContextAccessor _accessor;
|
private readonly IHttpContextAccessor _accessor;
|
||||||
|
private readonly IStringLocalizer _localizer;
|
||||||
|
|
||||||
public LogManager(ILogRepository logs, ITenantResolver tenantResolver, IConfigurationRoot config, IUserPermissions userPermissions, IHttpContextAccessor accessor)
|
public LogManager(ILogRepository logs, ITenantResolver tenantResolver, IConfigurationRoot config, IUserPermissions userPermissions, IHttpContextAccessor accessor, IStringLocalizer<LogManager> localizer)
|
||||||
{
|
{
|
||||||
_logs = logs;
|
_logs = logs;
|
||||||
_tenantResolver = tenantResolver;
|
_tenantResolver = tenantResolver;
|
||||||
_config = config;
|
_config = config;
|
||||||
_userPermissions = userPermissions;
|
_userPermissions = userPermissions;
|
||||||
_accessor = accessor;
|
_accessor = accessor;
|
||||||
|
_localizer = localizer;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Log(LogLevel level, object @class, LogFunction function, string message, params object[] args)
|
public void Log(LogLevel level, object @class, LogFunction function, string message, params object[] args)
|
||||||
@ -123,6 +124,7 @@ namespace Oqtane.Infrastructure
|
|||||||
log.LogDate = DateTime.UtcNow;
|
log.LogDate = DateTime.UtcNow;
|
||||||
log.Server = Environment.MachineName;
|
log.Server = Environment.MachineName;
|
||||||
log.MessageTemplate = log.Message;
|
log.MessageTemplate = log.Message;
|
||||||
|
log.Message = _localizer[log.Message];
|
||||||
log = ProcessStructuredLog(log);
|
log = ProcessStructuredLog(log);
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
0
Oqtane.Server/Resources/.gitkeep
Normal file
0
Oqtane.Server/Resources/.gitkeep
Normal file
@ -51,8 +51,8 @@ This project is a work in progress and the schedule for implementing enhancement
|
|||||||
|
|
||||||
V.2.1.0 ( Q1 2021 )
|
V.2.1.0 ( Q1 2021 )
|
||||||
- [ ] Complete Static Localization of Admin UI
|
- [ ] Complete Static Localization of Admin UI
|
||||||
|
- [ ] Cross Platform Database Support ( ie. SQLite )
|
||||||
- [ ] EF Core Migrations for Database Installation/Upgrade
|
- [ ] EF Core Migrations for Database Installation/Upgrade
|
||||||
- [ ] Support for Multiple Relational Databases ( ie. SQLite )
|
|
||||||
|
|
||||||
V.2.0.0 ( released in conjuntion with .NET 5 on Nov 11, 2020 )
|
V.2.0.0 ( released in conjuntion with .NET 5 on Nov 11, 2020 )
|
||||||
- [x] Migration to .NET 5
|
- [x] Migration to .NET 5
|
||||||
|
Reference in New Issue
Block a user