Package org.apache.sling.hc.util

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


    }

    @Override
    public Result execute() {
        final FormattingResultLog resultLog = new FormattingResultLog();
        resultLog.debug("Checking expression [{}], language extension=[{}]",  expression, languageExtension);
        try {
            final ScriptEngine engine = scriptEngineManager.getEngineByExtension(languageExtension);
            if (engine == null) {
                resultLog.healthCheckError("No ScriptEngine available for extension {}", languageExtension);
            } else {
View Full Code Here


                }
                log.debug("All Bindings added: {}", b.keySet());

                final Object value = engine.eval(expression, b);
                if(value!=null && "true".equals(value.toString().toLowerCase())) {
                    resultLog.debug("Expression [{}] evaluates to true as expected", expression);
                } else {
                    resultLog.warn("Expression [{}] does not evaluate to true as expected, value=[{}]", expression, value);
                }
            }
        } catch (final Exception e) {
View Full Code Here

                    try {
                        ReplicationQueueItem item = q.getHead();
                        if (item != null) {
                            ReplicationQueueItemState status = q.getStatus(item);
                            if (status.getAttempts() <= numberOfRetriesAllowed) {
                                resultLog.debug("Queue: [{}], first item: [{}], number of retries: {}", q.getName(), item.getId(), status.getAttempts());
                            } else {
                                // the no. of attempts is higher than the configured threshold
                                resultLog.warn("Queue: [{}], first item: [{}], number of retries: {}, expected number of retries <= {}",
                                        q.getName(), item.getId(), status.getAttempts(), numberOfRetriesAllowed);
                                failures.put(q.getName(), status.getAttempts());
View Full Code Here

                                resultLog.warn("Queue: [{}], first item: [{}], number of retries: {}, expected number of retries <= {}",
                                        q.getName(), item.getId(), status.getAttempts(), numberOfRetriesAllowed);
                                failures.put(q.getName(), status.getAttempts());
                            }
                        } else {
                            resultLog.debug("No items in queue [{}]", q.getName());
                        }

                    } catch (Exception e) {
                        resultLog.warn("Exception while inspecting replication queue [{}]: {}", q.getName(), e);
                    }
View Full Code Here

                    } catch (Exception e) {
                        resultLog.warn("Exception while inspecting replication queue [{}]: {}", q.getName(), e);
                    }
            }
        } else {
            resultLog.debug("No replication queue providers found");
        }

        if (failures.size() > 0) {
            // a specific log entry (using markdown) to provide a recommended user action
            for (Map.Entry<String, Integer> entry : failures.entrySet()) {
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);
        } finally {
            if (resolver != null) {
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);
        } finally {
            if (resolver != null) {
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.