diff --git a/main/NPOI.Core.csproj b/main/NPOI.Core.csproj
index 54cc21d1e..24d396636 100644
--- a/main/NPOI.Core.csproj
+++ b/main/NPOI.Core.csproj
@@ -24,10 +24,6 @@
-
-
-
-
diff --git a/main/Util/POILogFactory.cs b/main/Util/POILogFactory.cs
index 8f6603b8e..c5fe33bd4 100644
--- a/main/Util/POILogFactory.cs
+++ b/main/Util/POILogFactory.cs
@@ -83,11 +83,18 @@ public static POILogger GetLogger(String cat)
// that our users can set the system property
// between class loading and first use
if(_loggerClassName == null) {
+#if NETFRAMEWORK
try {
_loggerClassName = ConfigurationManager.AppSettings["loggername"];
} catch(Exception) {}
-
- // Use the default logger if none specified,
+#endif
+ if(_loggerClassName == null)
+ {
+ // try environment
+ _loggerClassName = Environment.GetEnvironmentVariable("NPOI_LOGGER_NAME");
+ }
+
+ // Use the default logger if none specified,
// or none could be fetched
if(_loggerClassName == null) {
_loggerClassName = _nullLogger.GetType().Name;
diff --git a/main/Util/SystemOutLogger.cs b/main/Util/SystemOutLogger.cs
index 40e415786..2d3be5e7f 100644
--- a/main/Util/SystemOutLogger.cs
+++ b/main/Util/SystemOutLogger.cs
@@ -77,9 +77,18 @@ public override bool Check(int level)
int currentLevel;
try
{
- string temp = ConfigurationManager.AppSettings["poi.log.level"];
- if (string.IsNullOrEmpty(temp))
+ string temp = Environment.GetEnvironmentVariable("NPOI_LOG_LEVEL");
+#if NETFRAMEWORK
+ if (temp == null)
+ {
+ temp = ConfigurationManager.AppSettings["poi.log.level"];
+ }
+#endif
+ if(string.IsNullOrEmpty(temp))
+ {
temp = WARN.ToString(CultureInfo.InvariantCulture);
+ }
+
currentLevel = int.Parse(temp, CultureInfo.InvariantCulture);
}
catch
diff --git a/testcases/main/NPOI.TestCases.Core.csproj b/testcases/main/NPOI.TestCases.Core.csproj
index 99d53cab7..9e4948573 100644
--- a/testcases/main/NPOI.TestCases.Core.csproj
+++ b/testcases/main/NPOI.TestCases.Core.csproj
@@ -19,6 +19,7 @@
+