private void InitializeLogger() { var logFile = LayerBlockchainNetwork.GetIpAddress().Replace(':', '_') + ".txt"; var config = new NLog.Config.LoggingConfiguration(); var logfile = new NLog.Targets.FileTarget("logfile") { FileName = logFile }; var logconsole = new NLog.Targets.ConsoleTarget("logconsole"); config.AddRule(LogLevel.Trace, LogLevel.Fatal, logconsole); config.AddRule(LogLevel.Trace, LogLevel.Fatal, logfile); LogManager.Configuration = config; }
public WalletPage(User user) { InitializeComponent(); InitializeLogger(); TryCreateShortcut(); // create shortcut, so i will be able to show toasts //INITIALIZE CHAIN, ETC _loggedUser = user; var bank = new WalletBank(); _loggedUserWallet = bank.FindWallet(user.Address); _friChain = new BlockChain(LayerBlockchainNetwork.GetIpAddress()); //REGISTER CLOSING EVENET Application.Current.MainWindow.Closing += new CancelEventHandler(AppClosing); //SET GUI PROPERTIES InitializeProfile(); UpdateBalance(); UpdateRawChain(); UpdatePeerList(); }