public void Initialize() { this.properties["logger_name"] = "test log #1"; this.properties2["logger_name"] = "test log #1"; this.properties2[Log4NETImpl.CONFIG_FILE] = "../../conf/log4net.config"; this.log = new Log4NETImpl(this.properties2); }
protected void SetUp() { namedMsg = new NamedMessage(MESSAGE, NAMEDMESSAGE, new List<string>(PARAMETER_NAMES), Level.ERROR); config = new DefaultConfiguration("default"); config.SetSimpleAttribute("logger_name", LOGNAME); config.SetSimpleAttribute("default_level", DEFAULT_LEVEL.ToString()); config.SetSimpleAttribute("config_file", CONFIG_FILE); IConfiguration msgsConfig = new DefaultConfiguration("NamedMessages"); IConfiguration msgConfig = new DefaultConfiguration(NAMEDMESSAGE); msgConfig.SetSimpleAttribute("text", MESSAGE); msgConfig.SetSimpleAttribute("default_level", Level.DEBUG); msgConfig.SetAttribute("parameters", new object[] {PARAMETER_NAMES[0], PARAMETER_NAMES[1]}); msgsConfig.AddChild(msgConfig); config.AddChild(msgsConfig); logger = new Log4NETImpl(config); }