private static bool LogFilter(string category, LogLevel level, IMsilDecompilerEnvironment environment) { if (environment.LogLevel > level) { return(false); } if (!category.StartsWith("ILSpy.Host", StringComparison.OrdinalIgnoreCase)) { return(false); } return(true); }
public Startup(IMsilDecompilerEnvironment env) { _env = env; Log.Logger = new LoggerConfiguration() .MinimumLevel.Debug() .Enrich.FromLogContext() .WriteTo.ColoredConsole() .CreateLogger(); var builder = new ConfigurationBuilder() .SetBasePath(AppContext.BaseDirectory) .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true) .AddEnvironmentVariables("ILSPYHOST_"); Configuration = builder.Build(); }
public SimpleDecompilationProvider(IMsilDecompilerEnvironment decompilationConfiguration, ILoggerFactory loggerFactory) { _logger = loggerFactory.CreateLogger <SimpleDecompilationProvider>(); }