Skip to content

Commit

Permalink
Merge pull request #36 from Ellerbach/mtirion/fix-null-length
Browse files Browse the repository at this point in the history
Small logging changes.
  • Loading branch information
mtirionMSFT authored Oct 24, 2023
2 parents 9ce3508 + 8a7ee4c commit 0cc5252
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/DocLinkChecker/DocLinkChecker/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ private static void DetermineConfiguration(string[] args)
{
if (File.Exists(AppConstants.AppConfigFileName))
{
console.Error($"***ERROR: {AppConstants.AppConfigFileName} already exists in this folder. We don't overwrite.");
console.Error($"*** ERROR: {AppConstants.AppConfigFileName} already exists in this folder. We don't overwrite.");

// indicate we're done with an error
ReturnValue = ReturnValue.CommandError;
Expand Down Expand Up @@ -196,7 +196,7 @@ private static void ProcessCommandlineParameters(CommandLineOptions o)
_appConfig.ConfigFilePath = Path.GetFullPath(o.ConfigFilePath);
if (!File.Exists(o.ConfigFilePath))
{
console.Error($"***ERROR: configuration file {o.ConfigFilePath} not found.");
console.Error($"*** ERROR: configuration file {o.ConfigFilePath} not found.");

// indicate we're done with errors in the configuration file
ReturnValue = ReturnValue.ConfigurationFileErrors;
Expand All @@ -218,7 +218,7 @@ private static void ProcessCommandlineParameters(CommandLineOptions o)
}
catch (Exception ex)
{
console.Error($"***ERROR: reading {o.ConfigFilePath} - {ex.Message}");
console.Error($"*** ERROR: reading {o.ConfigFilePath} - {ex.Message}");

// indicate we're done with errors in the configuration file
ReturnValue = ReturnValue.ConfigurationFileErrors;
Expand All @@ -234,7 +234,7 @@ private static void ProcessCommandlineParameters(CommandLineOptions o)

if (string.IsNullOrEmpty(_appConfig.DocumentationFiles.SourceFolder))
{
console.Error("***ERROR: No document folder was configured, either through -d or in the config file.");
console.Error("*** ERROR: No document folder was configured, either through -d or in the config file.");
ReturnValue = ReturnValue.ConfigurationFileErrors;
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public CrawlerService(
}
catch (Exception ex)
{
_console.Error($"*** ERROR: {ex.Message}");
_console.Verbose($"*** ERROR in {nameof(ParseMarkdownFiles)} processing {file} [ignored]: {ex.Message}.\n{ex}");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using System.IO;
using System.Linq;
using System.Net;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
using DocLinkChecker.Enums;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public ResourceValidatorService(
}
catch (Exception ex)
{
_console.Error($"*** ERROR: {ex.Message}");
_console.Verbose($"*** ERROR in {nameof(CheckForOrphanedResources)} processing {resource} [ignored]: {ex.Message}.\n{ex}");
}
}

Expand Down

0 comments on commit 0cc5252

Please sign in to comment.