Skip to content

Commit

Permalink
Only log to error in DEBUG mode
Browse files Browse the repository at this point in the history
  • Loading branch information
RenderMichael committed Aug 4, 2023
1 parent 2d31ef5 commit ea89f52
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions PdfSharpCore/Utils/FontResolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@ public static void SetupFontsFiles(string[] sSupportedFonts)
}
catch (System.Exception e)
{
#if DEBUG
System.Console.Error.WriteLine(e);
#endif
}
}

Expand All @@ -139,7 +141,9 @@ public static void SetupFontsFiles(string[] sSupportedFonts)
}
catch (System.Exception e)
{
#if DEBUG
System.Console.Error.WriteLine(e);
#endif
}
}

Expand Down
4 changes: 4 additions & 0 deletions PdfSharpCore/Utils/LinuxSystemFontResolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,9 @@ public static string[] Resolve()
}
catch(Exception ex)
{
#if DEBUG
Console.Error.WriteLine(ex.ToString());
#endif
return ResolveFallback().Where(x => x.EndsWith(".ttf", StringComparison.OrdinalIgnoreCase)).ToArray();
}
}
Expand Down Expand Up @@ -194,8 +196,10 @@ static IEnumerable<string> SearchPaths()
}
catch (Exception ex)
{
#if DEBUG
Console.Error.WriteLine(ex.Message);
Console.Error.WriteLine(ex.StackTrace);
#endif
}

dirs.Add("/usr/share/fonts");
Expand Down

0 comments on commit ea89f52

Please sign in to comment.