Skip to content

Commit

Permalink
Merge pull request #5059 from ghubstan/fix-createofferservice-log-sta…
Browse files Browse the repository at this point in the history
…tement

Fix log statement format
  • Loading branch information
ripcurlx authored Jan 7, 2021
2 parents 6fc9ad4 + 424c3cb commit ad9949c
Showing 1 changed file with 24 additions and 11 deletions.
35 changes: 24 additions & 11 deletions core/src/main/java/bisq/core/offer/CreateOfferService.java
Original file line number Diff line number Diff line change
Expand Up @@ -110,31 +110,44 @@ public Offer createAndGetOffer(String offerId,
double buyerSecurityDepositAsDouble,
PaymentAccount paymentAccount) {

log.info("offerId={}, \n" +
log.info("create and get offer with offerId={}, \n" +
"currencyCode={}, \n" +
"direction={}, \n" +
"price={}, \n" +
"useMarketBasedPrice={}, \n" +
"marketPriceMargin={}, \n" +
"amount={}, \n" +
"minAmount={}, \n" +
"buyerSecurityDeposit={}, \n" +
offerId, currencyCode, direction, price.getValue(), useMarketBasedPrice, marketPriceMargin,
amount.value, minAmount.value, buyerSecurityDepositAsDouble);

// prints our param list for dev testing api
log.info("{} " +
"{} " +
"{} " +
"buyerSecurityDeposit={}",
offerId,
currencyCode,
direction,
price.getValue(),
useMarketBasedPrice,
marketPriceMargin,
amount.value,
minAmount.value,
buyerSecurityDepositAsDouble);

// 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: {} " +
"{} " +
"{} " +
"{} " +
"{} " +
"{} " +
"{} " +
"{}",
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 ? marketPriceMargin : price.getValue()),
buyerSecurityDepositAsDouble);

long creationTime = new Date().getTime();
NodeAddress makerAddress = p2PService.getAddress();
Expand Down

0 comments on commit ad9949c

Please sign in to comment.