mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Runtime logger renamed to avoid confusion
This commit is contained in:
+10
-9
@@ -13,7 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.intellij.openapi.diagnostic.rt;
|
||||
package com.intellij.openapi.diagnostic;
|
||||
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -22,15 +22,16 @@ import org.jetbrains.annotations.Nullable;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.LogManager;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
/**
|
||||
* A wrapper which uses either IDE logging subsystem (if available) or java.util.logging.
|
||||
*
|
||||
* @since 12.0
|
||||
*/
|
||||
public abstract class Logger {
|
||||
public abstract class LoggerRt {
|
||||
private interface Factory {
|
||||
Logger getInstance(@NotNull @NonNls final String category);
|
||||
LoggerRt getInstance(@NotNull @NonNls final String category);
|
||||
}
|
||||
|
||||
private static Factory ourFactory;
|
||||
@@ -48,7 +49,7 @@ public abstract class Logger {
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static Logger getInstance(@NotNull @NonNls final String category) {
|
||||
public static LoggerRt getInstance(@NotNull @NonNls final String category) {
|
||||
return getFactory().getInstance(category);
|
||||
}
|
||||
|
||||
@@ -84,9 +85,9 @@ public abstract class Logger {
|
||||
private final LogManager myManager = LogManager.getLogManager();
|
||||
|
||||
@Override
|
||||
public Logger getInstance(@NotNull @NonNls final String category) {
|
||||
final java.util.logging.Logger logger = myManager.getLogger(category);
|
||||
return new Logger() {
|
||||
public LoggerRt getInstance(@NotNull @NonNls final String category) {
|
||||
final Logger logger = myManager.getLogger(category);
|
||||
return new LoggerRt() {
|
||||
@Override
|
||||
public void info(@Nullable @NonNls final String message, @Nullable final Throwable t) {
|
||||
logger.log(Level.INFO, message, t);
|
||||
@@ -124,10 +125,10 @@ public abstract class Logger {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Logger getInstance(@NotNull @NonNls final String category) {
|
||||
public LoggerRt getInstance(@NotNull @NonNls final String category) {
|
||||
try {
|
||||
final Object logger = myGetInstance.invoke(null, category);
|
||||
return new Logger() {
|
||||
return new LoggerRt() {
|
||||
@Override
|
||||
public void info(@Nullable @NonNls final String message, @Nullable final Throwable t) {
|
||||
try {
|
||||
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
package com.intellij.openapi.util.io;
|
||||
|
||||
import com.intellij.openapi.diagnostic.rt.Logger;
|
||||
import com.intellij.openapi.diagnostic.LoggerRt;
|
||||
import com.intellij.openapi.util.SystemInfoRt;
|
||||
import com.intellij.openapi.util.text.StringUtilRt;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
@@ -34,7 +34,7 @@ import java.util.UUID;
|
||||
*/
|
||||
@SuppressWarnings({"UtilityClassWithoutPrivateConstructor"})
|
||||
public class FileUtilRt {
|
||||
private static final Logger LOG = Logger.getInstance("#com.intellij.openapi.util.io.FileUtilLight");
|
||||
private static final LoggerRt LOG = LoggerRt.getInstance("#com.intellij.openapi.util.io.FileUtilLight");
|
||||
|
||||
protected static final ThreadLocal<byte[]> BUFFER = new ThreadLocal<byte[]>() {
|
||||
protected byte[] initialValue() {
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2009 JetBrains s.r.o.
|
||||
* Copyright 2000-2012 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -18,7 +18,7 @@ package com.intellij.openapi.vcs.changes.actions;
|
||||
import com.intellij.openapi.actionSystem.AnAction;
|
||||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||||
import com.intellij.openapi.actionSystem.PlatformDataKeys;
|
||||
import com.intellij.openapi.diagnostic.rt.Logger;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.diff.impl.patch.BinaryFilePatch;
|
||||
import com.intellij.openapi.diff.impl.patch.FilePatch;
|
||||
import com.intellij.openapi.diff.impl.patch.IdeaTextPatchBuilder;
|
||||
|
||||
Reference in New Issue
Block a user