Skip to content

Commit bb45fd0

Browse files
Improves diagnostic logging and fixes typo
Updates logging to use Console.WriteLine instead of Debug.WriteLine for better visibility. Includes server config status in HTTP challenge server logs. Corrects a typo in the CLI help text for backup import.
1 parent af8ff9b commit bb45fd0

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

src/Certify.CLI/CertifyCLI.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ internal void ShowHelp()
108108
System.Console.WriteLine("certify credential list : list current stored credential summary information");
109109
System.Console.WriteLine("certify activate <email address> <key> : activate your Certify The Web install using your license key");
110110
System.Console.WriteLine("certify backup export <directory or full filename> <encryption secret> : export a backup file (autonamed if a directory) using the given secret password for encryption.");
111-
System.Console.WriteLine("certify backup import preview <full filename> <encryption secret> : import a backup file using the given secret password for encryption. 'preview' is optional and us used to test a backup without importing anything.");
111+
System.Console.WriteLine("certify backup import preview <full filename> <encryption secret> : import a backup file using the given secret password for encryption. 'preview' is optional and is used to test a backup without importing anything.");
112112
System.Console.WriteLine("\n\n");
113113
System.Console.WriteLine("For help, see the docs at https://docs.certifytheweb.com");
114114

src/Certify.Shared/Utils/HttpChallengeServer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ public bool Start(ServiceConfig serverConfig, string controlKey = null, string c
146146

147147
Log($"Http Challenge Server Started: {uriPrefix}", true);
148148
Log($"Control Key: {_controlKey}: Check Key: {_checkKey}");
149-
Log($"Using Internal API: {_baseUri}");
149+
Log($"Using Internal API: {_baseUri} {serverConfig.ConfigStatus}");
150150

151151
_ = Task.Run(ServerTask);
152152

src/Certify.Shared/Utils/ServiceConfigManager.cs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,12 @@ public static ServiceConfig GetAppServiceConfig()
3333
if (!string.IsNullOrWhiteSpace(config))
3434
{
3535
serviceConfig = JsonConvert.DeserializeObject<ServiceConfig>(config);
36+
37+
System.Console.WriteLine($"ServiceConfigManager: Loaded {config}");
3638
}
3739
else
3840
{
39-
System.Diagnostics.Debug.WriteLine($"ServiceConfigManager: Empty service config found at {serviceConfigFile}");
41+
System.Console.WriteLine($"ServiceConfigManager: Empty service config found at {serviceConfigFile}");
4042
}
4143

4244
serviceConfig.ConfigStatus = ConfigStatus.NotModified;
@@ -45,7 +47,7 @@ public static ServiceConfig GetAppServiceConfig()
4547
{
4648
serviceConfig.ConfigStatus = ConfigStatus.New;
4749

48-
System.Diagnostics.Debug.WriteLine($"ServiceConfigManager: No service config found at {serviceConfigFile}");
50+
System.Console.WriteLine($"ServiceConfigManager: No service config found at {serviceConfigFile}");
4951

5052
}
5153
}
@@ -65,7 +67,7 @@ public static ServiceConfig GetAppServiceConfig()
6567
// if something went wrong, default to standard config
6668
if (serviceConfig == null)
6769
{
68-
System.Diagnostics.Debug.WriteLine($"ServiceConfigManager: Falling back to default service config.");
70+
System.Console.WriteLine($"ServiceConfigManager: Falling back to default service config.");
6971
serviceConfig = new ServiceConfig()
7072
{
7173
ConfigStatus = ConfigStatus.DefaultFailed

0 commit comments

Comments
 (0)