com.thjug.process.LogWatcher.java Source code

Java tutorial

Introduction

Here is the source code for com.thjug.process.LogWatcher.java

Source

/*
 * Attribution
 * CC BY
 * This license lets others distribute, remix, tweak,
 * and build upon your work, even commercially,
 * as long as they credit you for the original creation.
 * This is the most accommodating of licenses offered.
 * Recommended for maximum dissemination and use of licensed materials.
 *
 * http://creativecommons.org/licenses/by/3.0/
 * http://creativecommons.org/licenses/by/3.0/legalcode
 */
package com.thjug.process;

import org.apache.zookeeper.WatchedEvent;
import org.apache.zookeeper.Watcher;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 *
 * @author nuboat
 */
public class LogWatcher implements Watcher {

    private static final Logger LOG = LoggerFactory.getLogger(LogWatcher.class);

    @Override
    public void process(WatchedEvent we) {
        LOG.info(we.toString());
    }

}