Fix log statement format

A log statement was mismatching argument placeholders with argument
values because it was formatted as
	log.info("msg={}, \n" + args...)
instead of
	log.info("msg={}", args...)

Some code formatting was also done to this block, and a closer approximation
of a CLI 'createoffer` param list replaces the following log statement.
This commit is contained in:
ghubstan 2021-01-06 17:58:52 -03:00
parent 6fc9ad4c9b
commit 80c10dba78
No known key found for this signature in database
GPG Key ID: E35592D6800A861E

View File

@ -110,7 +110,7 @@ public class CreateOfferService {
double buyerSecurityDepositAsDouble,
PaymentAccount paymentAccount) {
log.info("offerId={}, \n" +
log.info("create and get offer with offerId={}, \n" +
"currencyCode={}, \n" +
"direction={}, \n" +
"price={}, \n" +
@ -118,14 +118,21 @@ public class CreateOfferService {
"marketPriceMargin={}, \n" +
"amount={}, \n" +
"minAmount={}, \n" +
"buyerSecurityDeposit={}, \n" +
offerId, currencyCode, direction, price.getValue(), useMarketBasedPrice, marketPriceMargin,
amount.value, minAmount.value, buyerSecurityDepositAsDouble);
"buyerSecurityDeposit={}",
offerId,
currencyCode,
direction,
price.getValue(),
useMarketBasedPrice,
marketPriceMargin,
amount.value,
minAmount.value,
buyerSecurityDepositAsDouble);
// prints our param list for dev testing api
log.info("{} " +
"{} " +
"{} " +
// Log an approximate api CLI 'createoffer' dev/test param list.
log.info("cli's createoffer positional option names: paymentAccountId direction currencyCode amount minAmount"
+ " useMarketBasedPrice fixedPrice|marketPriceMargin buyerSecurityDeposit");
log.info("cli's createoffer positional option values: {} " +
"{} " +
"{} " +
"{} " +
@ -133,8 +140,14 @@ public class CreateOfferService {
"{} " +
"{} " +
"{}",
offerId, currencyCode, direction.name(), price.getValue(), useMarketBasedPrice, marketPriceMargin,
amount.value, minAmount.value, buyerSecurityDepositAsDouble, paymentAccount.getId());
paymentAccount.getId(),
direction.name(),
currencyCode,
amount.value,
minAmount.value,
useMarketBasedPrice,
(useMarketBasedPrice == true ? marketPriceMargin : price.getValue()),
buyerSecurityDepositAsDouble);
long creationTime = new Date().getTime();
NodeAddress makerAddress = p2PService.getAddress();