Package com.alipay.sofa.common.log.env
Class LogEnvUtils
java.lang.Object
com.alipay.sofa.common.log.env.LogEnvUtils
日志环境工具类:根据不同的环境选择不同的日志实现
Created by yangguanchao on 16/9/20.
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
static String
getLogConfEnvSuffix
(String spaceName) static boolean
isCommonsLoggingUsable
(ClassLoader spaceClassloader) slf4j-jcl commons-logger 默认使用 log4j 作为初始化实现static boolean
isLog4j2Usable
(ClassLoader spaceClassloader) static boolean
isLog4jUsable
(ClassLoader spaceClassloader) static boolean
isLogbackUsable
(ClassLoader spaceClassloader) static boolean
static boolean
static boolean
static void
keepCompatible
(Map<String, String> context, boolean keep) keep compatible with previous version.Processing global configuration for sofa-common-logging, priorities as follows: 1.
-
Method Details
-
isLogbackUsable
-
isLog4j2Usable
-
isLog4jUsable
-
isCommonsLoggingUsable
slf4j-jcl commons-logger 默认使用 log4j 作为初始化实现- Parameters:
spaceClassloader
-- Returns:
-
processGlobalSystemLogProperties
Processing global configuration for sofa-common-logging, priorities as follows: 1. JVM System Properties 2. OS Env Properties 3. External Configurations Some configurations specific to SOFA: 1. logging.path 2. loggingRoot 3. file.encoding, defaults to UTF-8 4. PID -
getLogConfEnvSuffix
-
keepCompatible
keep compatible with previous version. Set system properties of the following attributes: logging.path loggingRoot file.encoding -
isLogStarterExist
public static boolean isLogStarterExist() -
isSofaCommonLoggingConfig
-
clearGlobalSystemProperties
public static void clearGlobalSystemProperties() -
isUseDefaultSystemProperties
public static boolean isUseDefaultSystemProperties()
-