Actually, you are asking for a log file per module. That shouldn’t require a new ContextSelector. That would only be required if you wanted to have a separate configuration for each module.
Right now Log4j doesn’t do anything to identify what module a class is located in. That would be required to use the RoutingAppender. Log4j is not yet modularized. The module system was up in the air until about 6 weeks ago so we put off work on that. Ralph > On Sep 18, 2017, at 7:57 AM, Matt Sicker <boa...@gmail.com> wrote: > > Take a look at the ClassLoaderContextSelector class along with the JPMS > API. It should be relatively self explanatory. Feel free to follow up with > questions on the dev list if you want as well. > > On 18 September 2017 at 09:40, Alex Sviridov <ooo_satu...@mail.ru.invalid> > wrote: > >> The problem is that I know nothing about log4j architecture. I am just a >> user. >> >> Is it so difficult task? If log4j has access to class it can access and >> its module and after that use sift appender by module name. >> Application module has name, automatic module has name, >> all unnamed module goes to one file. >> >> Another question - has anyone tried log4j as named module on java 9? >> >> Best regards, Alex >> >> >>> Понедельник, 18 сентября 2017, 16:44 +03:00 от Ralph Goers < >> ralph.go...@dslextreme.com>: >>> >>> Right now LoggerContexts are organized around ClassLoaders. We haven’t >> even talked about creating a ModuleContextSelector. If you want to help >> contribute towards that it would be welcome. >>> >>> Ralph >>> >>>> On Sep 18, 2017, at 1:18 AM, Alex Sviridov < ooo_satu...@mail.ru.INVALID >>> wrote: >>>> >>>> Hi all >>>> >>>> Could anyone say if log4j 1/2 can create separate log file for every >> JPMS module? >>>> >>>> For example I have application that consists of three named modules >> moduleA, moduleB, >>>> moduleC. And I want to have three log files moduleA.log, moduleB.log, >> moduleC.log. >>>> >>>> If such feature is not supported, can anyone say when approximately it >> will be >>>> implemented. >>>> >>>> Best regards, Alex >>> >>> >> >> >> -- >> Alex Sviridov >> > > > > -- > Matt Sicker <boa...@gmail.com> --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-user-h...@logging.apache.org