public class MultiAppLoggerSpaceManager extends Object
init(String,Map)
2. Get logger via getLoggerBySpace
Created by kevin.luy@alipay.com on 2016/12/7.
Updated by guanchao.ygc@alibaba-inc.com on 14/04/28.| 构造器和说明 |
|---|
MultiAppLoggerSpaceManager() |
| 限定符和类型 | 方法和说明 |
|---|---|
static org.slf4j.Logger |
getLoggerBySpace(String name,
SpaceId spaceId)
Get logger from specified spaceName
The return logger is obtained from corresponding LoggerFactory which is configured by its own log configs
|
static org.slf4j.Logger |
getLoggerBySpace(String name,
SpaceId spaceId)
已过时。
|
static org.slf4j.Logger |
getLoggerBySpace(String name,
SpaceId spaceId,
ClassLoader spaceClassloader)
Get logger from specified spaceName
The return logger is obtained from corresponding LoggerFactory which is configured by its own log configs
|
static org.slf4j.Logger |
getLoggerBySpace(String name,
SpaceId spaceId,
ClassLoader spaceClassloader)
已过时。
|
static org.slf4j.Logger |
getLoggerBySpace(String name,
String spaceName)
Get logger from specified spaceName
The return logger is obtained from corresponding LoggerFactory which is configured by its own log configs
|
static org.slf4j.Logger |
getLoggerBySpace(String name,
String spaceName,
ClassLoader spaceClassloader)
Get logger from specified spaceName
The return logger is obtained from corresponding LoggerFactory which is configured by its own log configs
|
static Map |
getSpacesMap()
已过时。
|
static void |
init(SpaceId spaceId,
Map<String,String> props,
ClassLoader spaceClassloader)
Invoke this method before using if some special configurations for the log space are needed.
|
static void |
init(SpaceId spaceId,
Map<String,String> props,
ClassLoader spaceClassloader)
已过时。
|
static void |
init(String spaceName,
Map<String,String> props)
Invoke this method before using if some special configurations for the log space are needed.
|
static boolean |
isSpaceInitialized(SpaceId spaceId) |
static boolean |
isSpaceInitialized(SpaceId spaceId)
已过时。
|
static boolean |
isSpaceInitialized(String spaceName) |
static org.slf4j.ILoggerFactory |
removeILoggerFactoryBySpaceId(SpaceId spaceId) |
static org.slf4j.ILoggerFactory |
removeILoggerFactoryBySpaceId(SpaceId spaceId)
已过时。
|
static org.slf4j.ILoggerFactory |
removeILoggerFactoryBySpaceName(String spaceName) |
static org.slf4j.Logger |
setLoggerLevel(String loggerName,
SpaceId spaceId,
AdapterLevel adapterLevel) |
static org.slf4j.Logger |
setLoggerLevel(String loggerName,
SpaceId spaceId,
AdapterLevel adapterLevel)
已过时。
|
static org.slf4j.Logger |
setLoggerLevel(String loggerName,
String spaceName,
AdapterLevel adapterLevel) |
public static void init(String spaceName, Map<String,String> props)
spaceName - space nameprops - properties used to populate log contextpublic static void init(SpaceId spaceId, Map<String,String> props, ClassLoader spaceClassloader)
spaceId - space identityprops - properties used to populate log context@Deprecated public static void init(SpaceId spaceId, Map<String,String> props, ClassLoader spaceClassloader)
public static org.slf4j.Logger getLoggerBySpace(String name, String spaceName)
name - logger namespaceName - space namepublic static org.slf4j.Logger getLoggerBySpace(String name, SpaceId spaceId)
name - logger namespaceId - space identification@Deprecated public static org.slf4j.Logger getLoggerBySpace(String name, SpaceId spaceId)
public static org.slf4j.Logger getLoggerBySpace(String name, String spaceName, ClassLoader spaceClassloader)
name - logger namespaceName - space namespaceClassloader - the class loader used to load resourcespublic static org.slf4j.Logger getLoggerBySpace(String name, SpaceId spaceId, ClassLoader spaceClassloader)
name - logger namespaceId - space identificationspaceClassloader - the class loader used to load resources@Deprecated public static org.slf4j.Logger getLoggerBySpace(String name, SpaceId spaceId, ClassLoader spaceClassloader)
public static org.slf4j.Logger setLoggerLevel(String loggerName, String spaceName, AdapterLevel adapterLevel)
public static org.slf4j.Logger setLoggerLevel(String loggerName, SpaceId spaceId, AdapterLevel adapterLevel)
@Deprecated public static org.slf4j.Logger setLoggerLevel(String loggerName, SpaceId spaceId, AdapterLevel adapterLevel)
public static org.slf4j.ILoggerFactory removeILoggerFactoryBySpaceName(String spaceName)
public static org.slf4j.ILoggerFactory removeILoggerFactoryBySpaceId(SpaceId spaceId)
@Deprecated public static org.slf4j.ILoggerFactory removeILoggerFactoryBySpaceId(SpaceId spaceId)
public static boolean isSpaceInitialized(String spaceName)
public static boolean isSpaceInitialized(SpaceId spaceId)
@Deprecated public static boolean isSpaceInitialized(SpaceId spaceId)
@Deprecated public static Map getSpacesMap()
Copyright © 2021. All rights reserved.