本文整理了Java中org.ocpsoft.logging.Logger.getLogger()
方法的一些代码示例,展示了Logger.getLogger()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.getLogger()
方法的具体详情如下:
包路径:org.ocpsoft.logging.Logger
类名称:Logger
方法名:getLogger
[英]Create a Logger instance for a specific class
[中]为特定类创建记录器实例
代码示例来源:origin: org.ocpsoft.logging/logging-api
/**
* Create a {@link Logger} instance for a specific class
*
* @param clazz The class to create the log for
* @return The {@link Logger} instance
*/
public static Logger getLogger(final Class<?> clazz)
{
return getLogger(clazz.getName());
}
代码示例来源:origin: ocpsoft/rewrite
/**
* Create a {@link Logger} instance for a specific class
*
* @param clazz The class to create the log for
* @return The {@link Logger} instance
*/
public static Logger getLogger(final Class<?> clazz)
{
return getLogger(clazz.getName());
}
代码示例来源:origin: org.jboss.windup.config/windup-config-api
public static Log message(Class<?> cls, Level level, String message)
{
return new Log(Logger.getLogger(cls), level, message);
}
代码示例来源:origin: windup/windup
public static Log message(Class<?> cls, Level level, String message)
{
return new Log(Logger.getLogger(cls), level, message);
}
代码示例来源:origin: org.jboss.windup.web.addons/windup-web-support-impl
private static List<String> findPaths(Path path, boolean relativeOnly)
{
List<String> results = new ArrayList<>();
results.add(path.normalize().toAbsolutePath().toString());
if (Files.isDirectory(path))
{
try (DirectoryStream<Path> directoryStream = Files.newDirectoryStream(path))
{
for (Path child : directoryStream)
{
results.addAll(findPaths(child, relativeOnly));
}
}
catch (IOException e)
{
Logger.getLogger(PackageDiscoveryServiceImpl.class).warn("Could not read file: " + path + " due to: " + e.getMessage());
}
}
else if (Files.isRegularFile(path) && ZipUtil.endsWithZipExtension(path.toString()))
{
results.addAll(ZipUtil.scanZipFile(path, relativeOnly));
}
return results;
}
}
代码示例来源:origin: org.jboss.windup.config/windup-config-api
private Log(Logger log, Level level, String message)
{
Class<?> caller = findClassCaller();
if (caller == null)
caller = Log.class;
log = Logger.getLogger(caller);
if (level == null)
level = Level.INFO;
if (message == null)
message = "(null)";
this.log = log;
this.level = level;
this.messageBuilder = new RegexParameterizedPatternBuilder(message);
}
代码示例来源:origin: windup/windup
private Log(Logger log, Level level, String message)
{
Class<?> caller = findClassCaller();
if (caller == null)
caller = Log.class;
log = Logger.getLogger(caller);
if (level == null)
level = Level.INFO;
if (message == null)
message = "(null)";
this.log = log;
this.level = level;
this.messageBuilder = new RegexParameterizedPatternBuilder(message);
}
代码示例来源:origin: ocpsoft/rewrite
public class AnnotationConfigProvider extends HttpConfigurationProvider
private final Logger log = Logger.getLogger(AnnotationConfigProvider.class);
代码示例来源:origin: ocpsoft/rewrite
public class AnnotationConfigProvider extends HttpConfigurationProvider
private final Logger log = Logger.getLogger(AnnotationConfigProvider.class);
内容来源于网络,如有侵权,请联系作者删除!