Allon Mureinik has posted comments on this change.
Change subject: core: improve logging
......................................................................
Patch Set 6: (6 inline comments)
really don't like the usage of "this.getClass().getSimpleName()".
Why not just use "getClass().getSimpleName()"?
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AuditLogCleanupManager.java
Line 22: return _instance;
Line 23: }
Line 24:
Line 25: private AuditLogCleanupManager() {
Line 26: log.info("Start initializing " +
this.getClass().getSimpleName());
The "this." is redundant.
Line 27: Calendar calendar = new GregorianCalendar();
Line 28: Date mAuditLogCleanupTime = Config.<DateTime>
GetValue(ConfigValues.AuditLogCleanupTime);
Line 29: calendar.setTimeInMillis(mAuditLogCleanupTime.getTime());
Line 30:
Line 33:
Line 34: log.info("Setting audit cleanup manager to run at: " +
cronExpression);
Line 35: SchedulerUtilQuartzImpl.getInstance().scheduleACronJob(this,
"OnTimer", new Class[] {}, new Object[] {},
Line 36: cronExpression);
Line 37: log.info("Finished initializing " +
this.getClass().getSimpleName());
here too
Line 38: }
Line 39:
Line 40: @OnTimerMethodAnnotation("OnTimer")
Line 41: public void OnTimer() {
Line 42: try {
Line 43: log.info("Start deleteAgedOutAuditLogs");
Line 44: DateTime latestTimeToKeep = DateTime.getNow().AddDays(
Line 45: Config.<Integer>
GetValue(ConfigValues.AuditLogAgingThreashold) * -1);
Line 46:
DbFacade.getInstance().getAuditLogDao().removeAllBeforeDate(latestTimeToKeep);
perhaps add a "done" log message?
Line 47: } catch (RuntimeException e) {
Line 48: log.error("deleteAgedOutAuditLog failed with exception",
e);
Line 49: }
Line 50: }
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/Backend.java
Line 191:
Line 192: _vdsErrorsTranslator = new
ErrorTranslatorImpl(VdsErrorsFileName);
Line 193:
Line 194: // initialize the JobRepository object and finalize
non-terminated jobs
Line 195: log.infoFormat("Mark incompleted jobs as {0}",
JobExecutionStatus.UNKNOWN.name());
AFIAK, incompleted->incomplete
Line 196: initJobRepository();
Line 197:
Line 198: // initializes the JobRepositoryCleanupManager
Line 199: JobRepositoryCleanupManager.getInstance().initialize();
Line 250:
ExecutionMessageDirector.getInstance().initialize(ExecutionMessageDirector.EXECUTION_MESSAGES_FILE_PATH);
Line 251: } catch (RuntimeException e) {
Line 252: log.error("Failed to initialize
ExecutionMessageDirector", e);
Line 253: }
Line 254:
why add this newline?
Line 255: }
Line 256:
Line 257: /**
Line 258: * Handles compensation in case of uncompleted compensation-aware
commands resulted from server failure.
....................................................
File
backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ErrorTranslatorImpl.java
Line 15:
Line 16: public final class ErrorTranslatorImpl implements ErrorTranslator {
Line 17:
Line 18: private static final long ONE_HOUR = 60 * 60 * 1000L;
Line 19: private static Log log =
LogFactory.getLog(ErrorTranslatorImpl.class);
should be final
Line 20: private List<String> messageSources;
Line 21: private Locale standardLocale;
Line 22: private Map<String, String> standardMessages;
Line 23: private ReapedMap<Locale, Map<String, String>> messagesByLocale;
--
To view, visit http://gerrit.ovirt.org/10823
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Iaea9c16e9913cdee4eef88de920e87bde8bc6b5d
Gerrit-PatchSet: 6
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alissa Bonas <[email protected]>
Gerrit-Reviewer: Alissa Bonas <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Ayal Baron <[email protected]>
Gerrit-Reviewer: Laszlo Hornyak <[email protected]>
Gerrit-Reviewer: Liron Aravot <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
Gerrit-Reviewer: Tal Nisan <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches