Changed InitializeLog4NET to return the first file appender from a list of appenders, instead of assuming that the first is the file appender.

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2163 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2012-10-20 07:38:15 +00:00
parent e63d81e0fe
commit 1abbf03dba

View file

@ -75,9 +75,10 @@ namespace GreenshotPlugin.Core {
// Get the logfile name
try {
if (((Hierarchy)LogManager.GetRepository()).Root.Appenders.Count > 0) {
IAppender appender = ((Hierarchy)LogManager.GetRepository()).Root.Appenders[0];
if (appender is FileAppender) {
return ((FileAppender)appender).File;
foreach (IAppender appender in ((Hierarchy)LogManager.GetRepository()).Root.Appenders) {
if (appender is FileAppender) {
return ((FileAppender)appender).File;
}
}
}
} catch {}