Use Logger instead of println
This commit is contained in:
parent
8bf4497879
commit
a221245909
@ -25,6 +25,9 @@ package com.iluwatar.cqrs.app;
|
|||||||
import java.math.BigInteger;
|
import java.math.BigInteger;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import com.iluwatar.cqrs.commandes.CommandServiceImpl;
|
import com.iluwatar.cqrs.commandes.CommandServiceImpl;
|
||||||
import com.iluwatar.cqrs.commandes.ICommandService;
|
import com.iluwatar.cqrs.commandes.ICommandService;
|
||||||
import com.iluwatar.cqrs.dto.Author;
|
import com.iluwatar.cqrs.dto.Author;
|
||||||
@ -39,6 +42,8 @@ import com.iluwatar.cqrs.util.HibernateUtil;
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class App {
|
public class App {
|
||||||
|
private static final Logger LOGGER = LoggerFactory.getLogger(App.class);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Program entry point
|
* Program entry point
|
||||||
*
|
*
|
||||||
@ -71,12 +76,12 @@ public class App {
|
|||||||
Book dddBook = queries.getBook("Domain-Driven Design");
|
Book dddBook = queries.getBook("Domain-Driven Design");
|
||||||
List<Book> jBlochBooks = queries.getAuthorBooks("jBloch");
|
List<Book> jBlochBooks = queries.getAuthorBooks("jBloch");
|
||||||
|
|
||||||
System.out.println("Author username : " + nullAuthor);
|
LOGGER.info("Author username : {}", nullAuthor);
|
||||||
System.out.println("Author eEvans : " + eEvans);
|
LOGGER.info("Author eEvans : {}", eEvans);
|
||||||
System.out.println("jBloch number of books : " + jBlochBooksCount);
|
LOGGER.info("jBloch number of books : {}", jBlochBooksCount);
|
||||||
System.out.println("Number of authors : " + authorsCount);
|
LOGGER.info("Number of authors : {}", authorsCount);
|
||||||
System.out.println("DDD book : " + dddBook);
|
LOGGER.info("DDD book : {}", dddBook);
|
||||||
System.out.println("jBloch books : " + jBlochBooks);
|
LOGGER.info("jBloch books : {}", jBlochBooks);
|
||||||
|
|
||||||
HibernateUtil.getSessionFactory().close();
|
HibernateUtil.getSessionFactory().close();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user