ahgittin commented on a change in pull request #1204:
URL: https://github.com/apache/brooklyn-server/pull/1204#discussion_r672175324
##########
File path:
core/src/main/java/org/apache/brooklyn/util/core/logbook/file/FileLogStore.java
##########
@@ -69,23 +70,28 @@
public final static ConfigKey<String> LOGBOOK_LOG_STORE_DATEFORMAT =
ConfigKeys.newStringConfigKey(
BASE_NAME_FILE_LOG_STORE + ".dateFormat", "Date format",
"yyyy-MM-dd'T'HH:mm:ss,SSS");
+ public final static TimeZone UTC_TIMEZONE = TimeZone.getTimeZone("UTC");
+
private final String filePath;
private final Path path;
private final String logLinePattern;
- private final String logDateFormat;
+ private final DateFormat dateFormat;
+
@VisibleForTesting
public FileLogStore() {
this.path = null;
this.filePath = "";
this.logLinePattern = LOGBOOK_LOG_STORE_REGEX.getDefaultValue();
- this.logDateFormat = LOGBOOK_LOG_STORE_DATEFORMAT.getDefaultValue();
+ dateFormat = new
SimpleDateFormat(LOGBOOK_LOG_STORE_DATEFORMAT.getDefaultValue());
Review comment:
personally i don't like the `this.` (except where it is needed)
##########
File path:
core/src/test/java/org/apache/brooklyn/util/core/logbook/file/FileLogStoreTest.java
##########
@@ -48,64 +49,74 @@
"\tat
org.apache.felix.scr.impl.ComponentRegistry.checkComponentName(ComponentRegistry.java:240)
~[?:?]\n" +
"\tat
org.apache.felix.scr.impl.BundleComponentActivator.validateAndRegister(BundleComponentActivator.java:443)
~[?:?]";
+ private final AtomicInteger lineCount = new AtomicInteger();
+
@BeforeTest
public void setUp() {
- TimeZone.setDefault(TimeZone.getTimeZone("GMT"));
+ TimeZone.setDefault(TimeZone.getTimeZone("UTC"));
Review comment:
i don't like having to set this in a test but don't have a better idea
so go for it
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]