This commit is contained in:
@@ -2,22 +2,16 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
|
||||||
using Microsoft.AspNetCore;
|
|
||||||
using Microsoft.AspNetCore.Hosting;
|
using Microsoft.AspNetCore.Hosting;
|
||||||
using Microsoft.Extensions.Hosting;
|
using Microsoft.Extensions.Hosting;
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
using NLog.Web;
|
using NLog.Web;
|
||||||
using NLog.Targets;
|
using NLog.Targets;
|
||||||
using NLog.Config;
|
using NLog.Config;
|
||||||
|
|
||||||
using App.Metrics;
|
using App.Metrics;
|
||||||
using App.Metrics.AspNetCore;
|
using App.Metrics.AspNetCore;
|
||||||
|
|
||||||
using AyaNova.Util;
|
using AyaNova.Util;
|
||||||
using AyaNova.Api.ControllerHelpers;
|
|
||||||
|
|
||||||
namespace AyaNova
|
namespace AyaNova
|
||||||
{
|
{
|
||||||
@@ -164,6 +158,21 @@ namespace AyaNova
|
|||||||
//This is the first log entry
|
//This is the first log entry
|
||||||
logger.Info("AYANOVA SERVER BOOTING (log level: \"{0}\")", ServerBootConfig.AYANOVA_LOG_LEVEL);
|
logger.Info("AYANOVA SERVER BOOTING (log level: \"{0}\")", ServerBootConfig.AYANOVA_LOG_LEVEL);
|
||||||
logger.Info(AyaNovaVersion.FullNameAndVersion);
|
logger.Info(AyaNovaVersion.FullNameAndVersion);
|
||||||
|
//log configuration
|
||||||
|
try
|
||||||
|
{
|
||||||
|
|
||||||
|
var AyaNovaConfig=config.AsEnumerable().Where(m => m.Key.StartsWith("AYANOVA") && m.Key!="AYANOVA_JWT_SECRET").Select(m=>m.Key+ "="+ m.Value).ToList();
|
||||||
|
|
||||||
|
var DiagConfig=string.Join(",", AyaNovaConfig);
|
||||||
|
DiagConfig=DbUtil.PasswordRedactedConnectionString(DiagConfig);
|
||||||
|
logger.Info($"BOOT: configuration {DiagConfig}");
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
logger.Error(ex, "BOOT: error fetching configuration");
|
||||||
|
}
|
||||||
|
logger.Debug($"BOOT: Full configuration is {config.GetDebugView()}");
|
||||||
logger.Debug("BOOT: Log path is \"{0}\" ", ServerBootConfig.AYANOVA_LOG_PATH);
|
logger.Debug("BOOT: Log path is \"{0}\" ", ServerBootConfig.AYANOVA_LOG_PATH);
|
||||||
|
|
||||||
if (ServerBootConfig.AYANOVA_LOG_ENABLE_LOGGER_DIAGNOSTIC_LOG)
|
if (ServerBootConfig.AYANOVA_LOG_ENABLE_LOGGER_DIAGNOSTIC_LOG)
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ namespace AyaNova.Util
|
|||||||
///////////////////////////////////////////
|
///////////////////////////////////////////
|
||||||
//clean out password from connection string
|
//clean out password from connection string
|
||||||
//for log purposes
|
//for log purposes
|
||||||
private static string PasswordRedactedConnectionString(string cs)
|
internal static string PasswordRedactedConnectionString(string cs)
|
||||||
{
|
{
|
||||||
var nStart = 0;
|
var nStart = 0;
|
||||||
var nStop = 0;
|
var nStop = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user