freemarker.log.Logger.ensureLoggerFactorySet()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(2.4k)|赞(0)|评价(0)|浏览(262)

本文整理了Java中freemarker.log.Logger.ensureLoggerFactorySet()方法的一些代码示例,展示了Logger.ensureLoggerFactorySet()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Logger.ensureLoggerFactorySet()方法的具体详情如下:
包路径:freemarker.log.Logger
类名称:Logger
方法名:ensureLoggerFactorySet

Logger.ensureLoggerFactorySet介绍

暂无

代码示例

代码示例来源:origin: org.freemarker/freemarker

  1. /**
  2. * Returns a logger for the specified category.
  3. *
  4. * @param category
  5. * a dot separated hierarchical category name. If a category prefix is in effect, it's prepended to the
  6. * category name.
  7. */
  8. public static Logger getLogger(String category) {
  9. if (categoryPrefix.length() != 0) {
  10. category = categoryPrefix + category;
  11. }
  12. synchronized (loggersByCategory) {
  13. Logger logger = (Logger) loggersByCategory.get(category);
  14. if (logger == null) {
  15. ensureLoggerFactorySet(false);
  16. logger = loggerFactory.getLogger(category);
  17. loggersByCategory.put(category, logger);
  18. }
  19. return logger;
  20. }
  21. }

代码示例来源:origin: org.freemarker/freemarker

  1. if (!loggerFactoryWasAlreadySet || libraryEnum != Logger.libraryEnum) {
  2. ensureLoggerFactorySet(true);

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.freemarker

  1. /**
  2. * Returns a logger for the specified category.
  3. *
  4. * @param category
  5. * a dot separated hierarchical category name. If a category prefix is in effect, it's prepended to the
  6. * category name.
  7. */
  8. public static Logger getLogger(String category) {
  9. if (categoryPrefix.length() != 0) {
  10. category = categoryPrefix + category;
  11. }
  12. synchronized (loggersByCategory) {
  13. Logger logger = (Logger) loggersByCategory.get(category);
  14. if (logger == null) {
  15. ensureLoggerFactorySet(false);
  16. logger = loggerFactory.getLogger(category);
  17. loggersByCategory.put(category, logger);
  18. }
  19. return logger;
  20. }
  21. }

代码示例来源:origin: org.freemarker/freemarker-gae

  1. /**
  2. * Returns a logger for the specified category.
  3. *
  4. * @param category
  5. * a dot separated hierarchical category name. If a category prefix is in effect, it's prepended to the
  6. * category name.
  7. */
  8. public static Logger getLogger(String category) {
  9. if (categoryPrefix.length() != 0) {
  10. category = categoryPrefix + category;
  11. }
  12. synchronized (loggersByCategory) {
  13. Logger logger = (Logger) loggersByCategory.get(category);
  14. if (logger == null) {
  15. ensureLoggerFactorySet(false);
  16. logger = loggerFactory.getLogger(category);
  17. loggersByCategory.put(category, logger);
  18. }
  19. return logger;
  20. }
  21. }

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.freemarker

  1. if (!loggerFactoryWasAlreadySet || libraryEnum != Logger.libraryEnum) {
  2. ensureLoggerFactorySet(true);

代码示例来源:origin: org.freemarker/freemarker-gae

  1. if (!loggerFactoryWasAlreadySet || libraryEnum != Logger.libraryEnum) {
  2. ensureLoggerFactorySet(true);

相关文章