private static void logConfig(string filename)
        {
            if (configLog)
            {
                try
                {
#if NETCORE
                    var logRepository = LogManager.GetRepository(Assembly.GetEntryAssembly());
                    if (filename != null)
                    {
                        XmlConfigurator.ConfigureAndWatch(logRepository, new FileInfo(filename));
                        GXLogging.Debug(log, "DOMConfigurator log4net configured with ", filename);
                    }
#else
                    if (filename != null)
                    {
                        XmlConfigurator.ConfigureAndWatch(new FileInfo(filename));
                        GXLogging.Debug(log, "DOMConfigurator log4net configured with ", filename);
                    }
                    else
                    {
                        XmlConfigurator.Configure();
                        GXLogging.Debug(log, "DOMConfigurator log4net configured with web.config");
                    }
#endif
                    GXLogging.Debug(log, "GxClasses version:", GxContext.StdClassesVersion());
                }
                catch (Exception ex)
                {
                    Console.WriteLine("Could not load log4net configuration: " + ex.Message);
                }
                configLog = false;
            }
        }