Skip to content

Commit

Permalink
date formats changed & log4j to 2.17.1 (#61)
Browse files Browse the repository at this point in the history
* date formats changed

* adding MODNCIP-33 to news for v1.10.0

* update news for MODNCIP-37

* adding MODNCIP-27 to news

* remove console

* log4j-api from 2.17.0 to 2.17.1

* FolioRemoteServiceManager - date format

* [maven-release-plugin] prepare release v1.10.0

* [maven-release-plugin] prepare for next development iteration
  • Loading branch information
mis306lu authored Feb 25, 2022
1 parent 3d962d9 commit e01e9d2
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 8 deletions.
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.10.0 2022-02-24
* [MODNCIP-33](https://issues.folio.org/browse/MODNCIP-33) - Adapt mod-ncip to the request schema changes
* [MODNCIP-37](https://issues.folio.org/browse/MODNCIP-37) - Support circulation interface v13
* [MODNCIP-27](https://issues.folio.org/browse/MODNCIP-27) - Resource leak, input stream not closed
## 1.9.0 2021-10-11
* [MODNCIP-23](https://issues.folio.org/browse/MODNCIP-23) - align dependency versions affected by Inventory's Optimistic Locking
## 1.8.0 2021-06-15
Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.folio</groupId>
<artifactId>mod-ncip</artifactId>
<version>1.10.1-SNAPSHOT</version>
<version>1.11.0-SNAPSHOT</version>
<name>NCIP</name>
<description>NCIP responder for FOLIO (internal module)</description>

Expand Down Expand Up @@ -130,7 +130,7 @@
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.17.0</version>
<version>2.17.1</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
Expand Down
9 changes: 5 additions & 4 deletions src/main/java/org/folio/ncip/FolioRemoteServiceManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
import org.apache.http.util.EntityUtils;

import java.time.LocalDateTime;
import java.time.ZonedDateTime;

public class FolioRemoteServiceManager implements RemoteServiceManager {

Expand Down Expand Up @@ -267,8 +268,8 @@ public JsonObject checkIn(CheckInItemInitiationData initData, String agencyId) t
"NCIP Properties have not been initialized. These properties (e.g. checkin.service.point.code) have to be set in mod-configuration so the Checkin Item service service can be called.");
}

DateTimeFormatter dtf = DateTimeFormatter.ofPattern(Constants.DATE_FORMAT_FOR_CIRC);
LocalDateTime now = LocalDateTime.now();
DateTimeFormatter dtf = DateTimeFormatter.ISO_OFFSET_DATE_TIME;
ZonedDateTime now = ZonedDateTime.now();
String returnDate = dtf.format(now);

String itemBarcode = initData.getItemId().getItemIdentifierValue();
Expand Down Expand Up @@ -501,8 +502,8 @@ public JsonObject acceptItem(AcceptItemInitiationData initData, UserId userId, S
request.put("holdingsRecordId", holdingsUuid.toString());
String sPointId = servicePoints.getJsonArray("servicepoints").getJsonObject(0).getString("id");
request.put("pickupServicePointId", sPointId);
DateTimeFormatter dtf = DateTimeFormatter.ofPattern(Constants.DATE_FORMAT_FOR_CIRC);
LocalDateTime now = LocalDateTime.now();
DateTimeFormatter dtf = DateTimeFormatter.ISO_OFFSET_DATE_TIME;
ZonedDateTime now = ZonedDateTime.now();
request.put("requestDate", dtf.format(now));

url = baseUrl + Constants.REQUEST_URL;
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/log4j.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Setup the root logger to use the DEBUG level and the appender named "file"
log4j.rootLogger=DEBUG, console, file
log4j.rootLogger=DEBUG, file
# The following are packages that you will usually want to keep set to INFO even if you set the default level to DEBUG.
log4j.logger.org.dozer=ERROR
log4j.logger.org.apache.commons.beanutils=ERROR
Expand All @@ -26,4 +26,4 @@ log4j.appender.file.layout.ConversionPattern=%d{DATE} %5p [%t] - %m%n

log4j.appender.console=org.apache.log4j.ConsoleAppender
log4j.appender.console.layout=org.apache.log4j.PatternLayout
log4j.appender.console.layout.ConversionPattern=%5p [%t] - %m%n
log4j.appender.console.layout.ConversionPattern=%5p [%t] - %m%n

0 comments on commit e01e9d2

Please sign in to comment.