Zookeeper not logging as per directory path in log4j

筅森魡賤 提交于 2020-01-16 14:55:03

问题


I have written a small main class which will instantiate a zookeeper server.

public class ZooKeeper {

    public static void main(String[] args) {
        QuorumPeerMain qp = new QuorumPeerMain();
        QuorumPeerConfig config = new QuorumPeerConfig();
        try {
            config.parse("D:\\kafka_2.12-2.2.0\\config\\zookeeper.properties");
            qp.runFromConfig(config);
            System.out.println("Started....");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

}

I give a parameter in -Dlog4j.debug -Dlog4j.configuration=file:D:\zookeeper-3.4.14\conf\log4j.properties -Dzookeeper.log.dir=D:\kafka_2.12-2.2.0\logs in VM arguments and also changed the log4j property to zookeeper.log.dir=D:/kafka_2.12-2.2.0/logs but still the logs are written to the eclipse consoled. Can anyone help here ?

来源:https://stackoverflow.com/questions/57336317/zookeeper-not-logging-as-per-directory-path-in-log4j

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!