This commit is contained in:
@@ -484,7 +484,7 @@ namespace AyaNova
|
|||||||
_newLog.LogInformation($"BOOT: Active techs - {UserBiz.ActiveCountAsync().Result}");
|
_newLog.LogInformation($"BOOT: Active techs - {UserBiz.ActiveCountAsync().Result}");
|
||||||
|
|
||||||
//Log the license info so it's on the record
|
//Log the license info so it's on the record
|
||||||
_newLog.LogInformation($"BOOT: License -\r\n=-=-=-=-=-=-=-=-=-=-\r\n{AyaNova.Core.License.LicenseInfo}=-=-=-=-=-=-=-=-=-=-");
|
_newLog.LogInformation($"BOOT: License {AyaNova.Core.License.LicenseInfoLogFormat}");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -280,6 +280,52 @@ namespace AyaNova.Core
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Fetch a summary of the license key for displaying in the log
|
||||||
|
/// </summary>
|
||||||
|
/// <returns> string containing current license information</returns>
|
||||||
|
internal static string LicenseInfoLogFormat
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
StringBuilder sb = new StringBuilder();
|
||||||
|
|
||||||
|
if (ActiveKey.IsEmpty)
|
||||||
|
{
|
||||||
|
return $"UNLICENSED, DB ID: {DbId}";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
if (ActiveKey.TrialLicense)
|
||||||
|
sb.Append("TRIAL, ");
|
||||||
|
|
||||||
|
sb.Append($"regto: {ActiveKey.RegisteredTo}, ");
|
||||||
|
sb.Append($"keyid: {ActiveKey.Id}, ");
|
||||||
|
sb.Append($"dbid: {DbId}, ");
|
||||||
|
sb.Append($"type: {(ActiveKey.RentalLicense ? "service" : "perpetual")}, ");
|
||||||
|
if (ActiveKey.WillExpire)
|
||||||
|
sb.Append($"exp: {DateUtil.ServerDateTimeString(ActiveKey.LicenseExpiration)}, ");
|
||||||
|
sb.Append($"maint. sub. exps: {DateUtil.ServerDateTimeString(ActiveKey.MaintenanceExpiration)}, ");
|
||||||
|
sb.Append("feat:");
|
||||||
|
foreach (LicenseFeature l in ActiveKey.Features)
|
||||||
|
{
|
||||||
|
//don't show the rental or trial features
|
||||||
|
if (l.Feature != TRIAL_FEATURE_NAME && l.Feature != RENTAL_FEATURE_NAME)
|
||||||
|
{
|
||||||
|
if (l.Count != 0)
|
||||||
|
sb.Append($"{l.Feature} - {l.Count}, ");
|
||||||
|
else
|
||||||
|
sb.Append($"{l.Feature}, ");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
return sb.ToString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Fetch a summary of the license key for displaying to the end user
|
/// Fetch a summary of the license key for displaying to the end user
|
||||||
/// via the API
|
/// via the API
|
||||||
|
|||||||
Reference in New Issue
Block a user