log4j2 with two rollingfile appenders not zipping one of them

Using log4j2 version 2.9.1 with the following log4j2.xml on Tomcat 7.0.41.

The config file is specified to the Tomcat service using the -Dlog4j.configurationFile= construct. The two appenders are used by two different webapps that instantiate with:

Logger loggwe = Logger.getLogger("RollingFile 'name' here");

Problem: The “dislog” appender rolls but never zips.

The “applog” appender zips as expected. Other portions of the dislog config, such as the Pattern, are used correctly so each webapp does use its section accordingly. One just won’t zip.

<?xml version="1.0" encoding="UTF-8"?>
<Configuration monitorInterval="60" status="INFO">
        <RollingFile name="dislog" fileName="D:/DocVue/apache-tomcat/webapps/DIS/WEB-INF/logs/dis.log" filePattern="D:/DocVue/apache-tomcat/webapps/DIS/WEB-INF/logs/dis-%d{MM-dd-yy}.%i.log.zip" append="true">
                <Pattern>D %-5p %d{MM/dd/yyyy HH:mm:ss.SSS} %m [%t]:%C.%M:%L%n</Pattern>
                <TimeBasedTriggeringPolicy interval="1" modulate="true" />
                <SizeBasedTriggeringPolicy size="10 MB" />
            <DefaultRolloverStrategy max="9" fileIndex="max">
                <Delete basePath="D:/DocVue/apache-tomcat/webapps/DIS/WEB-INF/logs">
                        <IfLastModified age="30d" />
                        <IfAccumulatedFileSize exceeds="100 MB" />
        <RollingFile name="applog" fileName="D:/DocVue/docvue/WEB-INF/log/docvue.log" filePattern="D:/DocVue/docvue/WEB-INF/log/docvue-%d{MM-dd-yy}.%i.log.zip" append="true">
                <Pattern>%-5p %d{MM/dd/yyyy HH:mm:ss.SSS} %m [%t]:%C.%M:%L%n</Pattern>
                <TimeBasedTriggeringPolicy interval="1" modulate="true" />
                <SizeBasedTriggeringPolicy size="10 MB" />
            <DefaultRolloverStrategy max="9" fileIndex="max">
                <Delete basePath="D:/DocVue/docvue/WEB-INF/log">
                        <IfLastModified age="30d" />
                        <IfAccumulatedFileSize exceeds="100 MB" />
        <Console name="console" target="SYSTEM_OUT">
            <PatternLayout pattern="%-5p %d{MM/dd/yyyy HH:mm:ss.SSS} %m [%t]:%C.%M:%L%n" />
        <Logger name="applog" level="info">
            <AppenderRef ref="applog"/>
        <Logger name="dislog" level="info">
            <AppenderRef ref="dislog"/>
        <Root level="info">
            <AppenderRef ref="console"/>

How to find the sum of TreeNode at n depth with a helper function?

So, I’m given these intructions.

/* Takes a depth n and a ReduceFunction f
and returns the “combined value” of all elements in the tree at depth n, where depth=0 is the root. “combined” means the result of
starting with f.initialValue and “concatentation or combination” each
element using f.combine Requirement: must use a loop*/

I have two functions, a main and a helper.
The main function is:

public OutT combineValuesAtDepth(int depth, ReduceFunction<T,OutT> f)


 private T combineValuesHelper(int depth, TreeNode<T> node, ReduceFunction<T,T> f, T sum)

Can someone conceptually walk me through the process of this? I’m a newbie in Java so any tips would help thanks.

Components not showing in second JPanel

So, I have this problem where when I add the components to the second JPanel, they are not showing.

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.border.*;

public class TestSeleccionJugadores2 extends JPanel {
 JPanel jpJugador1 = new JPanel();
 JPanel jpJugador2 = new JPanel();

 TitledBorder titledBorder1 = new TitledBorder("Jugador 1");
 TitledBorder titledBorder2 = new TitledBorder("Jugador 2");

 Font font1 = new Font("Microsoft JhengHei UI Light", Font.PLAIN + Font.BOLD, 14);
 Font font2 = new Font("Microsoft JhengHei UI Light", Font.PLAIN, 13);

 JLabel jlJ1 = new JLabel("Es un(a)");
 JLabel jlJ2 = new JLabel("Es un(a)");
 JLabel jlJ1Nombre = new JLabel("llamada(o)");
 JLabel jlJ2Nombre = new JLabel("llamada(o)");

 JComboBox<String> opciones1 = new JComboBox<>(new String[] {"Hombre", "Mujer", "Otro"});
 JComboBox<String> opciones2 = new JComboBox<>(new String[] {"Hombre", "Mujer", "Otro"});

JTextField nombreJ1 = new JTextField("Jugador 1", 5);
JTextField nombreJ2 = new JTextField("Jugador 2", 5);

public TestSeleccionJugadores2() {


 jpJugador1.setBounds(10, 25, 200, 100);
 jpJugador2.setBounds(10, 120, 200, 100);
 setBounds(0,0,300, 300);




 jlJ1.setBounds(10, 30, 80, 20);
 opciones1.setBounds(95, 30, 80, 20);
 jlJ1Nombre.setBounds(10, 55, 80, 20);
 nombreJ1.setBounds(95, 55, 80, 20);

 //These are showing in both JPanels.
 jlJ2.setBounds(10, 125, 80, 20);
 opciones2.setBounds(95, 125, 80, 20);
 jlJ2Nombre.setBounds(10, 155, 80, 20);
 nombreJ2.setBounds(95, 155, 80, 20);

 //Second components.





The seconds components are not showing in any JPanel. I have added them to the first JPanel and I’ve got the same problem.
In other class, with the main method, I add the principal JPanel to the frame.