Skip to content

Commit

Permalink
Moved log statements off of the INFO level
Browse files Browse the repository at this point in the history
  • Loading branch information
markusweimer committed Nov 25, 2013
1 parent 3368905 commit 0835f48
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public void subscribe(Class<? extends T> clazz, EventHandler<? extends T> handle
*/
@Override
public void onNext(T event) {
LOG.log(Level.INFO, "Invoked for event: {0}", event);
LOG.log(Level.FINEST, "Invoked for event: {0}", event);
lock.readLock().lock();
List<EventHandler<? extends T>> list;
try {
Expand All @@ -91,7 +91,7 @@ public void onNext(T event) {
throw new WakeRuntimeException("No event " + event.getClass() + " handler");
}
for (final EventHandler<? extends T> handler : list) {
LOG.log(Level.INFO, "Invoking {0}", handler);
LOG.log(Level.FINEST, "Invoking {0}", handler);
((EventHandler<T>) handler).onNext(event);
}
} finally {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public void run() {
SingleThreadStage.this.afterOnNext();
} catch (InterruptedException e) {
if (interrupted.get()) {
LOG.log(Level.INFO, name + " Closing Producer due to interruption");
LOG.log(Level.FINEST, name + " Closing Producer due to interruption");
break;
}
} catch (Throwable t) {
Expand Down
10 changes: 5 additions & 5 deletions wake/src/main/java/com/microsoft/wake/impl/StageManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ public final class StageManager implements Stage {
StageManager() {

stages = Collections.synchronizedList(new ArrayList<Stage>());
LOG.log(Level.INFO, "StageManager adds a shutdown hook");
LOG.log(Level.FINE, "StageManager adds a shutdown hook");
Runtime.getRuntime().addShutdownHook(new Thread(
new Runnable() {
@Override
public void run() {
try {
LOG.log(Level.INFO, "Shutdown hook : closing stages");
LOG.log(Level.FINEST, "Shutdown hook : closing stages");
StageManager.instance().close();
LOG.log(Level.INFO, "Shutdown hook : closed stages");
LOG.log(Level.FINEST, "Shutdown hook : closed stages");
} catch (Exception e) {
LOG.log(Level.WARNING, "StageManager close failure " + e.getMessage());
}
Expand All @@ -63,7 +63,7 @@ public static StageManager instance() {
}

public void register(Stage stage) {
LOG.log(Level.INFO, "StageManager adds stage " + stage);
LOG.log(Level.FINEST, "StageManager adds stage " + stage);

stages.add(stage);
}
Expand All @@ -72,7 +72,7 @@ public void register(Stage stage) {
public void close() throws Exception {
if (closed.compareAndSet(false, true)) {
for (Stage stage : stages) {
LOG.log(Level.INFO, "Closing {0}", stage);
LOG.log(Level.FINEST, "Closing {0}", stage);
stage.close();
}
}
Expand Down
2 changes: 1 addition & 1 deletion wake/src/main/java/com/microsoft/wake/remote/NetUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public static String getLocalAddress() {
throw new WakeRuntimeException("This machine apparently doesn't have any IP addresses (not even 127.0.0.1) on interfaces that are up.");
}
cached.set(sortedAddrs.pollFirst().getHostAddress());
LOG.log(Level.INFO, "Local address is {0}", cached.get());
LOG.log(Level.FINE, "Local address is {0}", cached.get());
} catch (SocketException e) {
throw new WakeRuntimeException("Unable to get local host address",
e.getCause());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public <T> DefaultRemoteManagerImplementation(
myIdentifier = new SocketRemoteIdentifier((InetSocketAddress) transport.getLocalAddress());
reSendStage = new RemoteSenderStage(codec, transport);
StageManager.instance().register(this);
LOG.log(Level.INFO, "RemoteManager {0} instantiated id {1} counter {2}", new Object[]{this.name, myIdentifier, counter.incrementAndGet()});
LOG.log(Level.FINEST, "RemoteManager {0} instantiated id {1} counter {2}", new Object[]{this.name, myIdentifier, counter.incrementAndGet()});
}

@Inject
Expand Down Expand Up @@ -199,7 +199,7 @@ public RemoteIdentifier getMyIdentifier() {
@Override
public void close() {
if (closed.compareAndSet(false, true)) {
LOG.log(Level.INFO, "RemoteManager: {0} Closing remote manager id: {1}", new Object[]{this.name, myIdentifier});
LOG.log(Level.FINE, "RemoteManager: {0} Closing remote manager id: {1}", new Object[]{this.name, myIdentifier});

final Runnable closeRunnable = new Runnable() {
@Override
Expand Down Expand Up @@ -250,7 +250,7 @@ public void run() {


if (closeExecutor.isTerminated()) {
LOG.log(Level.INFO, "close executor did terminate properly.");
LOG.log(Level.FINE, "close executor did terminate properly.");
} else {
LOG.log(Level.SEVERE, "close executor did not terminate properly.");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public class ProxyEventHandler<T> implements EventHandler<T> {
* @throws RemoteRuntimeException
*/
public ProxyEventHandler (RemoteIdentifier myId, RemoteIdentifier remoteId, String remoteSinkName, EventHandler<RemoteEvent<T>> handler, RemoteSeqNumGenerator seqGen) {
LOG.log(Level.INFO, "ProxyEventHandler myId: {0} remoteId: {1} remoteSink: {2} handler: {3}", new Object[] {myId, remoteId, remoteSinkName, handler});
LOG.log(Level.FINE, "ProxyEventHandler myId: {0} remoteId: {1} remoteSink: {2} handler: {3}", new Object[] {myId, remoteId, remoteSinkName, handler});
if (! (myId instanceof SocketRemoteIdentifier && remoteId instanceof SocketRemoteIdentifier) ) {
throw new RemoteRuntimeException("Unsupported remote identifier type");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public NettyMessagingTransport(String hostAddress, int serverPort, EStage<Transp
throw new TransportRuntimeException("Cannot bind to " + this.serverPort);
}

LOG.log(Level.INFO, "Starting netty transport socket address: {0}", this.localAddress);
LOG.log(Level.FINE, "Starting netty transport socket address: {0}", this.localAddress);
}

/**
Expand All @@ -154,15 +154,15 @@ public NettyMessagingTransport(String hostAddress, int serverPort, EStage<Transp
*/
@Override
public void close() throws Exception {
LOG.log(Level.INFO, "Closing netty transport socket address: {0}", this.localAddress);
LOG.log(Level.FINE, "Closing netty transport socket address: {0}", this.localAddress);

clientChannelGroup.close().awaitUninterruptibly();
serverChannelGroup.close().awaitUninterruptibly();

clientBootstrap.releaseExternalResources();
serverBootstrap.releaseExternalResources();

LOG.log(Level.INFO, "Closing netty transport socket address: {0} done", this.localAddress);
LOG.log(Level.FINE, "Closing netty transport socket address: {0} done", this.localAddress);
}

/**
Expand Down Expand Up @@ -319,7 +319,7 @@ public NettyClientEventListener(ConcurrentMap<SocketAddress, LinkReference> addr
}

public void registerErrorHandler(EventHandler<Exception> handler) {
LOG.log(Level.INFO, "set error handler {0}", handler);
LOG.log(Level.FINE, "set error handler {0}", handler);
this.handler = handler;
}

Expand Down Expand Up @@ -381,7 +381,7 @@ public NettyServerEventListener(ConcurrentMap<SocketAddress, LinkReference> addr
}

public void registerErrorHandler(EventHandler<Exception> handler) {
LOG.log(Level.INFO, "set error handler {0}", handler);
LOG.log(Level.FINE, "set error handler {0}", handler);
this.handler = handler;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public final class RuntimeClock implements Clock {
this.runtimeStopHandler = runtimeStopHandler;
this.idleHandler = idleHandler;

LOG.log(Level.INFO, "RuntimeClock instantiated.");
LOG.log(Level.FINE, "RuntimeClock instantiated.");
}

@Override
Expand Down Expand Up @@ -167,17 +167,17 @@ private void logThreads(final Level level, final String prefix) {
public final void run() {

try {
LOG.log(Level.INFO, "Subscribe event handlers");
LOG.log(Level.FINE, "Subscribe event handlers");
subscribe(StartTime.class, this.startHandler.get());
subscribe(StopTime.class, this.stopHandler.get());
subscribe(RuntimeStart.class, this.runtimeStartHandler.get());
subscribe(RuntimeStop.class, this.runtimeStopHandler.get());
subscribe(IdleClock.class, this.idleHandler.get());

LOG.log(Level.INFO, "Initiate runtime start");
LOG.log(Level.FINE, "Initiate runtime start");
this.handlers.onNext(new RuntimeStart(this.timer.getCurrent()));

LOG.log(Level.INFO, "Initiate start time");
LOG.log(Level.FINE, "Initiate start time");
final StartTime start = new StartTime(this.timer.getCurrent());
this.handlers.onNext(start);

Expand Down Expand Up @@ -223,8 +223,8 @@ public final void run() {
e.printStackTrace();
this.handlers.onNext(new RuntimeStop(this.timer.getCurrent(), e));
} finally {
logThreads(Level.INFO, "Threads running after exiting the clock main loop: ");
LOG.log(Level.INFO, "Runtime clock exit");
logThreads(Level.FINE, "Threads running after exiting the clock main loop: ");
LOG.log(Level.FINE, "Runtime clock exit");
}
}

Expand Down

0 comments on commit 0835f48

Please sign in to comment.