changeset 24:9641addafffe

Re #242: Create Qt# UI for WarFoundry * Tidy up logging * Set log rolling to once per start
author IBBoard <dev@ibboard.co.uk>
date Sat, 27 Feb 2010 14:03:46 +0000
parents d1259ec9d089
children 4ec2083eb755
files MainWindow.cs WarFoundry.exe.log4net
diffstat 2 files changed, 5 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/MainWindow.cs	Sun Feb 21 19:49:59 2010 +0000
+++ b/MainWindow.cs	Sat Feb 27 14:03:46 2010 +0000
@@ -541,6 +541,8 @@
 					CurrentArmy = null;
 					closed = true;
 				}
+			
+				log.Debug("Army "+(closed ? "" : "not")+" closed");
 			}
 			else
 			{
@@ -548,8 +550,6 @@
 				closed = true;
 			}
 			
-			log.Debug("Army "+(closed ? "" : "not")+" closed");
-			
 			return closed;
 		}
 		
@@ -574,6 +574,7 @@
 				string path = fileDialog.SelectedFiles()[0];
 				log.DebugFormat("Exporting to {0}", path);
 				WarFoundryHtmlExporter.GetDefault().ExportArmy(CurrentArmy, path);
+				log.Debug("Exported");
 			}
 		}
 	}
--- a/WarFoundry.exe.log4net	Sun Feb 21 19:49:59 2010 +0000
+++ b/WarFoundry.exe.log4net	Sat Feb 27 14:03:46 2010 +0000
@@ -7,10 +7,8 @@
 	</appender>
 	<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
 		<file value="logs/WarFoundry.log" />
-		<appendToFile value="false" />
-		<rollingStyle value="Size" />
-		<maxSizeRollBackups value="-1" />
-		<maximumFileSize value="100MB" />
+		<rollingStyle value="Once" />
+		<maxSizeRollBackups value="2" />
 		<layout type="log4net.Layout.PatternLayout">
 			<conversionPattern value="%-5p [%d{HH:MM:ss}]: %C{1}.%M() - Line: %L - %m%n" />
 		</layout>