Since my application supports some paranoid level of debugging (every data destination, every step in the code is written to the destination of the log), my code is littered with messages about registration in some methods, for example.
logger.Log(LogLevel.Debug, 0, "Initializing i18n..."); Lang.Language = SystemInfo.Language; Logger.Log(LogLevel.Debug, 0, "Default system language: " + Lang.Language); string[] languageFiles = Directory.GetFiles(ClientEnvironment.LanguagePath); Logger.Log(LogLevel.Debug, 0, "Initializing local language files...");
As you can see, there are only two βrealβ lines of code. This makes the code somewhat difficult to read. I wonder if I can specify a custom code formatting rule rule in Visual Studio so that the log lines are displayed in soft gray text instead of the default text color. This will result in implicit highlighting of the "real" code lines, which will result in more readable code.
I need something like:
If statement starts with "logger.Log", set foreground color to gray.
Do you know any plugins that could archive this behavior? Thank you in advance.
source share