|
19 | 19 | */
|
20 | 20 | package com.cognifide.apm.core.scripts;
|
21 | 21 |
|
| 22 | +import java.util.Arrays; |
| 23 | +import java.util.HashMap; |
| 24 | +import java.util.Map; |
| 25 | +import java.util.Set; |
| 26 | +import java.util.TreeMap; |
| 27 | +import java.util.concurrent.CopyOnWriteArraySet; |
| 28 | +import java.util.stream.Collectors; |
| 29 | + |
| 30 | +import org.apache.jackrabbit.api.JackrabbitSession; |
| 31 | +import org.apache.sling.api.resource.PersistenceException; |
| 32 | +import org.apache.sling.api.resource.ResourceResolver; |
| 33 | +import org.osgi.service.component.annotations.Component; |
| 34 | +import org.osgi.service.component.annotations.Reference; |
| 35 | +import org.osgi.service.component.annotations.ReferenceCardinality; |
| 36 | +import org.osgi.service.component.annotations.ReferencePolicy; |
| 37 | +import org.slf4j.Logger; |
| 38 | +import org.slf4j.LoggerFactory; |
| 39 | + |
22 | 40 | import com.cognifide.apm.api.actions.ActionResult;
|
23 | 41 | import com.cognifide.apm.api.actions.Context;
|
24 | 42 | import com.cognifide.apm.api.actions.SessionSavingMode;
|
@@ -150,6 +168,9 @@ private Progress execute(Script script, ExecutionMode mode, Map<String, String>
|
150 | 168 | }
|
151 | 169 | if (progress.isSuccess()) {
|
152 | 170 | savingPolicy.save(context.getSession(), SessionSavingMode.SINGLE);
|
| 171 | + LOGGER.info(String.format("Script execution completed successfully: %s [%s]", path, mode)); |
| 172 | + } else { |
| 173 | + LOGGER.info(String.format("Script execution failed: %s [%s]", path, mode)); |
153 | 174 | }
|
154 | 175 | return progress;
|
155 | 176 | }
|
|
0 commit comments