|
25 | 25 | import java.math.BigInteger;
|
26 | 26 | import java.util.List;
|
27 | 27 |
|
| 28 | +import org.slf4j.Logger; |
| 29 | +import org.slf4j.LoggerFactory; |
| 30 | + |
28 | 31 | import com.iluwatar.cqrs.commandes.CommandServiceImpl;
|
29 | 32 | import com.iluwatar.cqrs.commandes.ICommandService;
|
30 | 33 | import com.iluwatar.cqrs.dto.Author;
|
|
39 | 42 | *
|
40 | 43 | */
|
41 | 44 | public class App {
|
| 45 | + private static final Logger LOGGER = LoggerFactory.getLogger(App.class); |
| 46 | + |
42 | 47 | /**
|
43 | 48 | * Program entry point
|
44 | 49 | *
|
@@ -71,12 +76,12 @@ public static void main(String[] args) {
|
71 | 76 | Book dddBook = queries.getBook("Domain-Driven Design");
|
72 | 77 | List<Book> jBlochBooks = queries.getAuthorBooks("jBloch");
|
73 | 78 |
|
74 |
| - System.out.println("Author username : " + nullAuthor); |
75 |
| - System.out.println("Author eEvans : " + eEvans); |
76 |
| - System.out.println("jBloch number of books : " + jBlochBooksCount); |
77 |
| - System.out.println("Number of authors : " + authorsCount); |
78 |
| - System.out.println("DDD book : " + dddBook); |
79 |
| - System.out.println("jBloch books : " + jBlochBooks); |
| 79 | + LOGGER.info("Author username : {}", nullAuthor); |
| 80 | + LOGGER.info("Author eEvans : {}", eEvans); |
| 81 | + LOGGER.info("jBloch number of books : {}", jBlochBooksCount); |
| 82 | + LOGGER.info("Number of authors : {}", authorsCount); |
| 83 | + LOGGER.info("DDD book : {}", dddBook); |
| 84 | + LOGGER.info("jBloch books : {}", jBlochBooks); |
80 | 85 |
|
81 | 86 | HibernateUtil.getSessionFactory().close();
|
82 | 87 | }
|
|
0 commit comments