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 diff
     1.1 --- a/MainWindow.cs	Sun Feb 21 19:49:59 2010 +0000
     1.2 +++ b/MainWindow.cs	Sat Feb 27 14:03:46 2010 +0000
     1.3 @@ -541,6 +541,8 @@
     1.4  					CurrentArmy = null;
     1.5  					closed = true;
     1.6  				}
     1.7 +			
     1.8 +				log.Debug("Army "+(closed ? "" : "not")+" closed");
     1.9  			}
    1.10  			else
    1.11  			{
    1.12 @@ -548,8 +550,6 @@
    1.13  				closed = true;
    1.14  			}
    1.15  			
    1.16 -			log.Debug("Army "+(closed ? "" : "not")+" closed");
    1.17 -			
    1.18  			return closed;
    1.19  		}
    1.20  		
    1.21 @@ -574,6 +574,7 @@
    1.22  				string path = fileDialog.SelectedFiles()[0];
    1.23  				log.DebugFormat("Exporting to {0}", path);
    1.24  				WarFoundryHtmlExporter.GetDefault().ExportArmy(CurrentArmy, path);
    1.25 +				log.Debug("Exported");
    1.26  			}
    1.27  		}
    1.28  	}
     2.1 --- a/WarFoundry.exe.log4net	Sun Feb 21 19:49:59 2010 +0000
     2.2 +++ b/WarFoundry.exe.log4net	Sat Feb 27 14:03:46 2010 +0000
     2.3 @@ -7,10 +7,8 @@
     2.4  	</appender>
     2.5  	<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
     2.6  		<file value="logs/WarFoundry.log" />
     2.7 -		<appendToFile value="false" />
     2.8 -		<rollingStyle value="Size" />
     2.9 -		<maxSizeRollBackups value="-1" />
    2.10 -		<maximumFileSize value="100MB" />
    2.11 +		<rollingStyle value="Once" />
    2.12 +		<maxSizeRollBackups value="2" />
    2.13  		<layout type="log4net.Layout.PatternLayout">
    2.14  			<conversionPattern value="%-5p [%d{HH:MM:ss}]: %C{1}.%M() - Line: %L - %m%n" />
    2.15  		</layout>