• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java SessionLogEntry类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.eclipse.persistence.logging.SessionLogEntry的典型用法代码示例。如果您正苦于以下问题:Java SessionLogEntry类的具体用法?Java SessionLogEntry怎么用?Java SessionLogEntry使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



SessionLogEntry类属于org.eclipse.persistence.logging包,在下文中一共展示了SessionLogEntry类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: log

import org.eclipse.persistence.logging.SessionLogEntry; //导入依赖的package包/类
@Override
public void log(final SessionLogEntry sle) {
	switch (sle.getLevel()) {
	case SEVERE:
		LOGGER.error(sle.getMessage());
		break;
	case WARNING:
		LOGGER.warn(sle.getMessage());
		break;
	case INFO:
		LOGGER.info(sle.getMessage());
		break;
	default:
		LOGGER.debug(sle.getMessage());
		break;
	}
}
 
开发者ID:SAP,项目名称:sap_mobile_platform_extend_functionality,代码行数:18,代码来源:CustomSessionLog.java


示例2: log

import org.eclipse.persistence.logging.SessionLogEntry; //导入依赖的package包/类
/**
 *
 */
@Override
public void log(SessionLogEntry sle) {
    Logger lg  = getLogger(sle);
    String msg = getMessage(sle);

    if(lg != null && StringUtils.isNotBlank(msg)) {
        switch(sle.getLevel()) {
            case SessionLog.SEVERE  : lg.error(msg); break;
            case SessionLog.WARNING : lg.warn (msg); break;
            case SessionLog.INFO    : lg.info (msg); break;
            case SessionLog.FINE    : lg.debug(msg); break;
            case SessionLog.FINER   : lg.trace(msg); break;
            case SessionLog.FINEST  : lg.trace(msg); break;
            case SessionLog.ALL     : lg.trace(msg); break;
            default                 : lg.debug(msg); break;
        }
    }
}
 
开发者ID:lburgazzoli,项目名称:lb-karaf-examples-jpa,代码行数:22,代码来源:EclipseLinkOSGiSessionLogger.java


示例3: log

import org.eclipse.persistence.logging.SessionLogEntry; //导入依赖的package包/类
@Override
public void log(final SessionLogEntry entry) {
    if (!shouldLog(entry.getLevel(), entry.getNameSpace())) {
        return;
    }

    Logger logger = getLogger(entry.getNameSpace());
    LogLevel logLevel = getLogLevel(entry.getLevel());

    StringBuilder message = new StringBuilder();

    message.append(getSupplementDetailString(entry));
    message.append(formatMessage(entry));

    switch (logLevel) {
    case TRACE:
        logger.trace(message.toString());
        break;
    case DEBUG:
        logger.debug(message.toString());
        break;
    case INFO:
        logger.info(message.toString());
        break;
    case WARN:
        logger.warn(message.toString());
        break;
    case ERROR:
        logger.error(message.toString());
        break;
    default:
        throw new IllegalStateException("Not supported" + logLevel);
    }
}
 
开发者ID:antoniomaria,项目名称:karaf4-eclipselink-jpa,代码行数:35,代码来源:Slf4jSessionLogger.java


示例4: log

import org.eclipse.persistence.logging.SessionLogEntry; //导入依赖的package包/类
@Override
public void log(SessionLogEntry entry) {
	if (!shouldLog(entry.getLevel(), entry.getNameSpace())) {
		return;
	}

	Logger logger = getLogger(entry.getNameSpace());
	LogLevel logLevel = getLogLevel(entry.getLevel());

	StringBuilder message = new StringBuilder();

	message.append(getSupplementDetailString(entry));
	message.append(formatMessage(entry));

	switch (logLevel) {
	case TRACE:
		logger.trace(message.toString());
		break;
	case DEBUG:
		logger.debug(message.toString());
		break;
	case INFO:
		logger.info(message.toString());
		break;
	case WARN:
		logger.warn(message.toString());
		break;
	case ERROR:
		logger.error(message.toString());
		break;
	}
}
 
开发者ID:gaborfeher,项目名称:grantmaster,代码行数:33,代码来源:Slf4jSessionLogger.java


示例5: log

import org.eclipse.persistence.logging.SessionLogEntry; //导入依赖的package包/类
@Override
public void log(SessionLogEntry sessionLogEntry) {
  if (sessionLogEntry.getException()!=null) {
    switch (sessionLogEntry.getLevel()) {
      default: log.info(sessionLogEntry.getMessage(), sessionLogEntry.getException());
    }
  } else {
    switch (sessionLogEntry.getLevel()) {
      default: log.info(sessionLogEntry.getMessage());
    }
  }
}
 
开发者ID:mohitc,项目名称:NetworkTopologyDatastore,代码行数:13,代码来源:SLF4jCustomLog.java


示例6: log

import org.eclipse.persistence.logging.SessionLogEntry; //导入依赖的package包/类
@Override
public void log(SessionLogEntry entry) {
    if (!shouldLog(entry.getLevel(), entry.getNameSpace())) {
        return;
    }

    Logger logger = getLogger(entry.getNameSpace());
    LogLevel logLevel = getLogLevel(entry.getLevel());

    StringBuilder message = new StringBuilder();

    message.append(getSupplementDetailString(entry));
    message.append(formatMessage(entry));

    switch (logLevel) {
        case TRACE:
            logger.trace(message.toString());
            break;
        case DEBUG:
            logger.debug(message.toString());
            break;
        case INFO:
            logger.info(message.toString());
            break;
        case WARN:
            logger.warn(message.toString());
            break;
        case ERROR:
            logger.error(message.toString());
            break;
    }
}
 
开发者ID:claytonsilva,项目名称:exemplo-java,代码行数:33,代码来源:SessionLogger.java


示例7: log

import org.eclipse.persistence.logging.SessionLogEntry; //导入依赖的package包/类
@Override
public void log( SessionLogEntry entry )
{
    if( !shouldLog( entry.getLevel(), entry.getNameSpace() ) )
    {
        return;
    }
    Logger logger = getLogger( entry.getNameSpace() );
    LogLevel logLevel = getLogLevel( entry.getLevel() );
    StringBuilder message = new StringBuilder();
    message.append( getSupplementDetailString( entry ) );
    message.append( formatMessage( entry ) );
    switch( logLevel )
    {
        case TRACE:
            logger.trace( message.toString() );
            break;
        case DEBUG:
            logger.debug( message.toString() );
            break;
        case INFO:
            logger.info( message.toString() );
            break;
        case WARN:
            logger.warn( message.toString() );
            break;
        case ERROR:
            logger.error( message.toString() );
            break;
        default:
            throw new InternalError();
    }
}
 
开发者ID:werval,项目名称:werval,代码行数:34,代码来源:Slf4jSessionLogger.java


示例8: getMessage

import org.eclipse.persistence.logging.SessionLogEntry; //导入依赖的package包/类
/**
 *
 * @param sle
 * @return
 */
private String getMessage(SessionLogEntry sle) {
    StringBuilder msg = new StringBuilder();
    //msg.append(getSupplementDetailString(sle))
    msg.append(formatMessage(sle));

    return msg.toString();
}
 
开发者ID:lburgazzoli,项目名称:lb-karaf-examples-jpa,代码行数:13,代码来源:EclipseLinkOSGiSessionLogger.java


示例9: getLogger

import org.eclipse.persistence.logging.SessionLogEntry; //导入依赖的package包/类
/**
 *
 * @param sle
 * @return
 */
private Logger getLogger(SessionLogEntry sle) {
    String ns = sle.getNameSpace();
    if(StringUtils.isNotBlank(ns)) {
        ns = ns.toUpperCase();

        if(!LOGGERS.containsKey(ns)) {
            LOGGERS.put(ns,LoggerFactory.getLogger("JPA-" + ns));
        }

        return LOGGERS.get(ns);
    }

    return LOGGER;
}
 
开发者ID:lburgazzoli,项目名称:lb-karaf-examples-jpa,代码行数:20,代码来源:EclipseLinkOSGiSessionLogger.java


示例10: log

import org.eclipse.persistence.logging.SessionLogEntry; //导入依赖的package包/类
@Override
public void log(SessionLogEntry sessionLogEntry) {
    Logger logger = getLoggerForCategory(sessionLogEntry.getNameSpace());
    Level level = convertLevelIntToEnum(sessionLogEntry.getLevel());
    String message = formatMessage(sessionLogEntry);

    logger.log(level, message);
}
 
开发者ID:jipijapa,项目名称:jipijapa,代码行数:9,代码来源:JBossLogger.java


示例11: log

import org.eclipse.persistence.logging.SessionLogEntry; //导入依赖的package包/类
@Override
public void log(SessionLogEntry sessionLogEntry) {
    Logger logger = LOG;
    if (sessionLogEntry.getNameSpace() != null
        && sessionLogEntry.getNameSpace().equals("sql")) {
        logger = SQLLOG;
    }
    switch (sessionLogEntry.getLevel()) {
        case SEVERE:
            if (logger.isErrorEnabled()) {
                if (sessionLogEntry.getException() != null)
                    logger.error("exeption", sessionLogEntry.getException());
                else
                    logger.error(formatMessage(sessionLogEntry));
            }
            break;
        case WARNING:
            if (logger.isWarnEnabled()) {
                if (sessionLogEntry.getException() != null)
                    logger.warn("exeption", sessionLogEntry.getException());
                else
                    logger.warn(formatMessage(sessionLogEntry));
            }
            break;
        case INFO:
            if (logger.isInfoEnabled()) {
                if (sessionLogEntry.getException() != null)
                    logger.info("exeption", sessionLogEntry.getException());
                else
                    logger.info(formatMessage(sessionLogEntry));
            }
            break;
        default:
            if (logger.isDebugEnabled()) {
                if (sessionLogEntry.getException() != null)
                    logger.debug("exeption", sessionLogEntry.getException());
                else
                    logger.debug(formatMessage(sessionLogEntry));
            }
    }
}
 
开发者ID:inepex,项目名称:ineform,代码行数:42,代码来源:EclipseLinkSLF4jLogger.java



注:本文中的org.eclipse.persistence.logging.SessionLogEntry类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java UnwrapValidatedValue类代码示例发布时间:2022-05-22
下一篇:
Java GeneralClickAction类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap