public DeskBandUI(CSDeskBand.CSDeskBandWin w) { InitializeComponent(); RegistryProvider.Init(); SerilogProvider.Initialize(); // var logPath = Settings.AppDirectory + @"\Storage\Logs\activity-.log"; // // Log.Logger = new LoggerConfiguration() .MinimumLevel.Debug() .WriteTo.File(logPath, // rollingInterval: RollingInterval.Day, // flushToDiskInterval: TimeSpan.FromSeconds(1), // shared: true) .CreateLogger(); Log.Information("Starting NetMeter shell.."); SqliteProvider.DbPath = Settings.AppDirectory + @"\Storage\Common\LocalStorage.db"; DownloadLabel = this.LblDownload; UploadLabel = this.LblUpload; UploadIcon = this.pictUpload; DownloadIcon = this.pictDownload; deskUI = this; Log.Information("NetMeter started successfully.."); }
public static void Main(string[] args) { var host = CreateHostBuilder(args).Build(); IocProvider.Container = host.Services; SerilogProvider.StartWithMysql(IocProvider.GetService <IServiceConfigurationAgent>()?.LogConnectionString, "userservice_log"); host.Run(); }
public App() { RegistryProvider.Init(); Settings.AppDirectory = Environment.CurrentDirectory; Settings.AppExePath = Assembly.GetExecutingAssembly().Location; SerilogProvider.Initialize(); Log.Information("Starting App.."); SqliteProvider.DbPath = Settings.AppDirectory + @"\Storage\Common\LocalStorage.db"; EvolveProvider.Initialize(); }