Java Code Examples for consulo.logging.Logger#debug()

The following examples show how to use consulo.logging.Logger#debug() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: NettyUtil.java    From consulo with Apache License 2.0 6 votes vote down vote up
public static void logAndClose(@Nonnull Throwable error, @Nonnull Logger log, @Nonnull Channel channel) {
  // don't report about errors while connecting
  // WEB-7727
  try {
    if (error instanceof ConnectException) {
      log.debug(error);
    }
    else {
      log(error, log);
    }
  }
  finally {
    log.info("Channel will be closed due to error");
    channel.close();
  }
}
 
Example 2
Source File: DelegatingHttpRequestHandlerBase.java    From consulo with Apache License 2.0 5 votes vote down vote up
@Override
public void messageReceived(ChannelHandlerContext context, FullHttpRequest message) throws Exception {
  Logger logger = Logger.getInstance(BuiltInServer.class);
  if (logger.isDebugEnabled()) {
    logger.debug("\n\nIN HTTP: $message\n\n");
  }

  if (!process(context, message, new QueryStringDecoder(message.uri()))) {
    Responses.send(HttpResponseStatus.NOT_FOUND, context.channel(), message);
  }
}
 
Example 3
Source File: SystemNotificationsImpl.java    From consulo with Apache License 2.0 5 votes vote down vote up
private static Notifier getPlatformNotifier() {
  try {
    if (SystemInfo.isMac) {
      if (SystemInfo.isMacOSMountainLion && SystemProperties.getBooleanProperty("ide.mac.mountain.lion.notifications.enabled", true)) {
        return MountainLionNotifications.getInstance();
      }
      else {
        return GrowlNotifications.getInstance();
      }
    }
    else if (SystemInfo.isXWindow) {
      return LibNotifyWrapper.getInstance();
    }
    else if (SystemInfo.isWin10OrNewer) {
      return SystemTrayNotifications.getWin10Instance();
    }
  }
  catch (Throwable t) {
    Logger logger = Logger.getInstance(SystemNotifications.class);
    if (logger.isDebugEnabled()) {
      logger.debug(t);
    }
    else {
      logger.info(t.getMessage());
    }
  }

  return null;
}
 
Example 4
Source File: LogUtil.java    From consulo with Apache License 2.0 4 votes vote down vote up
/**
 * Format string syntax as in {@linkplain String#format(String, Object...)}.
 */
public static void debug(@Nonnull Logger logger, @NonNls @Nonnull String format, @Nullable Object... args) {
  if (logger.isDebugEnabled()) {
    logger.debug(String.format(format, args));
  }
}
 
Example 5
Source File: DesktopImportantFolderLocker.java    From consulo with Apache License 2.0 4 votes vote down vote up
private static void log(String format, Object... args) {
  Logger logger = Logger.getInstance(DesktopImportantFolderLocker.class);
  if (logger.isDebugEnabled()) {
    logger.debug(String.format(format, args));
  }
}