Java Utililty Methods slf4j Logger

List of utility methods to do slf4j Logger

Description

The list of methods to do slf4j Logger are organized into topic(s).

Method

voidcountMSCandidates(byte[] byteARR)
count MS Candidates
int candidateCountI = 0;
int noHitCountI = 0;
int byteNumI = 3;
int toI = byteARR.length - byteNumI;
ArrayList<Integer> tempAL = new ArrayList<Integer>();
for (int i = 0; i < toI; i += byteNumI) {
    for (int k = 0; k < 3; k++) {
        tempAL.add((int) byteARR[i + k] + 1);
...
voidcountMSCandidates_m2(ArrayList asHexAL)
grabs three bytes at a time - only divides them thusly for testing as candidates for magic square.
int countI = 0;
int noHitCountI = 0;
int nibbleNumI = 6;
int toI = asHexAL.size() / 6;
for (int i = 0; i < toI; i += 6) {
    String aS = asHexAL.get(i).toString();
    String bS = asHexAL.get(i + 1).toString() + asHexAL.get(i + 2).toString();
    String cS = asHexAL.get(i + 3).toString() + asHexAL.get(i + 4).toString()
...
voidd d(String fmt, Object... args)
d
i(logger, fmt, args);
voiddebug(Logger logger, Exception e)
debug
if (logger.isDebugEnabled()) {
    logger.debug(e.getMessage(), e);
voiddebug(Logger logger, String format, Object... arguments)
debug
if (logger.isDebugEnabled()) {
    logger.debug(format, arguments);
voiddisplayProperties(Logger log, Properties prop)
Print out properties' items into a log with the format: key = value.
Enumeration em = prop.keys();
while (em.hasMoreElements()) {
    String key = em.nextElement().toString();
    String value = prop.getProperty(key);
    String msg = key + " = " + value;
    if (log.isDebugEnabled()) {
        log.debug(msg);
    } else {
...
voiddumpConfiguration(Map map, Logger log)
dump Configuration
log.trace("Starting connector with configuration:");
for (Map.Entry entry : map.entrySet()) {
    log.trace("{}: {}", entry.getKey(), entry.getValue());
voiderror(Class clz, String logStr, Throwable e)
Log an exception (throwable) at the ERROR level with an accompanying message.
LoggerFactory.getLogger(clz).error("[" + clz.getSimpleName() + "] " + logStr, e);
voiderror(final BundleContext b, final String msg, final Throwable t)
Logs the message to the bundle's error level.
final String symbolicName = b.getBundle().getSymbolicName();
final Logger log = getLogger(symbolicName);
log.error(prefix(b, msg), t);
voiderror(Logger log, String fmt, String... args)
Utility method to print a formatted error to the log.
try {
    log.error(String.format(fmt, args));
} catch (Throwable ex) {