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

php - Submit Form Data without Reloading page -

linux - Rails running on virtual machine in Windows -

php - $params->set Array between square bracket -