Package org.apache.sling.hc.util

Examples of org.apache.sling.hc.util.FormattingResultLog.info()


public class AnnotatedHealthCheckSample implements HealthCheck{

    @Override
    public Result execute() {
        final FormattingResultLog resultLog = new FormattingResultLog();
        resultLog.info("All good at {}", new Date());
        return new Result(resultLog);
    }
}
View Full Code Here


        final int value =  counter.incrementAndGet();
        log.info("{} - counter set to {}", this, value);
       
        final FormattingResultLog resultLog = new FormattingResultLog();

        resultLog.info("{} - counter value set to {} at {}", this, value, new Date());
        if(value % 2 != 0) {
            resultLog.warn("Counter value ({}) is not even", value);
        }
        return new Result(resultLog);
    }
View Full Code Here

                    }
                }
            }

            if (templatesWithoutIcons > 0) {
                resultLog.info("[You have templates without thumbnails.]");
            } else {
                resultLog.debug("All templates have thumbnails.");
            }
        } catch (Exception e) {
            log.error("Unable to list templates", e);
View Full Code Here

                    }
                }
            }

            if (componentsWithoutIcons > 0) {
                resultLog.info("[You have component without icons.]");
            } else {
                resultLog.debug("All components have icons.");
            }
        } catch (Exception e) {
            log.error("Unable to list components", e);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.