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

The following examples show how to use consulo.logging.Logger#getInstance() . 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: 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 2
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 3
Source File: StartupUtil.java    From consulo with Apache License 2.0 5 votes vote down vote up
public static void prepareAndStart(String[] args, BiFunction<String, String, ImportantFolderLocker> lockFactory, PairConsumer<Boolean, CommandLineArgs> appStarter) {
  boolean newConfigFolder;
  CommandLineArgs commandLineArgs = CommandLineArgs.parse(args);

  if (commandLineArgs.isShowHelp()) {
    CommandLineArgs.printUsage();
    System.exit(ExitCodes.USAGE_INFO);
  }

  if (commandLineArgs.isShowVersion()) {
    ApplicationInfo infoEx = ApplicationInfo.getInstance();
    System.out.println(infoEx.getFullApplicationName());
    System.exit(ExitCodes.VERSION_INFO);
  }

  AppUIUtil.updateFrameClass();
  newConfigFolder = !new File(ContainerPathManager.get().getConfigPath()).exists();

  ActivationResult result = lockSystemFolders(lockFactory, args);
  if (result == ActivationResult.ACTIVATED) {
    System.exit(0);
  }
  else if (result != ActivationResult.STARTED) {
    System.exit(ExitCodes.INSTANCE_CHECK_FAILED);
  }

  Logger log = Logger.getInstance(StartupUtil.class);
  logStartupInfo(log);
  loadSystemLibraries(log);
  fixProcessEnvironment(log);

  appStarter.consume(newConfigFolder, commandLineArgs);
}
 
Example 4
Source File: ObjectTree.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Nonnull
private static Logger getLogger() {
  return Logger.getInstance(ObjectTree.class);
}
 
Example 5
Source File: LowMemoryWatcherManager.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Nonnull
private static Logger getLogger() {
  return Logger.getInstance(LowMemoryWatcherManager.class);
}
 
Example 6
Source File: FileUtilRt.java    From consulo with Apache License 2.0 4 votes vote down vote up
private static Logger logger() {
  return Logger.getInstance(FileUtilRt.class);
}
 
Example 7
Source File: DesktopStartUIUtil.java    From consulo with Apache License 2.0 4 votes vote down vote up
private static Logger getLogger() {
  return Logger.getInstance(DesktopStartUIUtil.class);
}
 
Example 8
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));
  }
}
 
Example 9
Source File: JBUIScale.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Nonnull
public static Logger getLogger() {
  return Logger.getInstance(JBUIScale.class);
}
 
Example 10
Source File: JBUIScale.java    From consulo with Apache License 2.0 4 votes vote down vote up
private static Logger log() {
  return Logger.getInstance(JBUIScale.class);
}
 
Example 11
Source File: UIUtil.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Nonnull
public static Logger getLogger() {
  return Logger.getInstance(UIUtil.class);
}
 
Example 12
Source File: DetectRetinaKit.java    From consulo with Apache License 2.0 4 votes vote down vote up
@Nonnull
// cannot be static because logging maybe not configured yet
private static Logger getLogger() {
  return Logger.getInstance(DetectRetinaKit.class);
}