APISonar


org.jboss.logging.Logger.log

> org > jboss > logging > Logger > log
org APIs jboss APIs logging APIs Logger APIs log APIs

Example 1
public void log(SessionLogEntry sessionLogEntry) {
        Logger logger = getLoggerForCategory(sessionLogEntry.getNameSpace());
        Level level = convertLevelIntToEnum(sessionLogEntry.getLevel());
        String message = formatMessage(sessionLogEntry);

        logger.log(level, message);
    }
Example 2
public static void logConfigurationState(Configuration c, Logger logger, Level logLevel) {
        Iterator<String> configKeys = c.getKeys();
        while (configKeys.hasNext()) {
            String k = configKeys.next();
            logger.log(logLevel, String.format("Configuration: %s: %s", k, c.getProperty(k)));
        }
    }
Example 3
private static final Logger LOGGER = Logger.getLogger(LoggingServlet.class);

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        final String prefix = getPrefix(request.getParameter(PARAM_PREFIX));
        for (Logger.Level level : LOG_LEVELS) {
            LOGGER.log(level, MessageFormat.format(MSG_TEMPLATE, prefix, getLevelStr(level)));
        }
        response.setStatus(HttpServletResponse.SC_OK);
    }