log4j - java Apache L4J - logging to file known only during the runtime -


is there simple way achieve described in topic?

i know normally, l4j.properties contains information file, store informations. catch have file during runtime, need set file in kind of dynamic way , append new logs it?

any ideas?

you this:

    string logfile = ...// log4j.xml absolute path     domconfigurator.configure(logfile);      logger log = logger.getrootlogger();     string fileappendername = ...     fileappender fa = (fileappender)log.getappender(fileappendername);     fa.setfile(yourlogfile) 

Comments

Popular posts from this blog

Python Kivy ListView: How to delete selected ListItemButton? -

asp.net mvc 4 - A specified Include path is not valid. The EntityType '' does not declare a navigation property with the name '' -