reset password
Author Message
raylongma1018
Posts: 81
Posted 17:18 Aug 03, 2015 |

Hi Dr.Sun

from your video lectures, you add the dependencies slf4j-log4j to pom.xml, this means we create a slf4j api links to the log4j logging library. If we add slf4j-api and log4j individually without using the link like you did, will this create the effect as slf4j-log4j?

also from your page6 of your lecture notes, you mention there are different logging libraries, such as slf4j, log4j, isn't slf4j an api, not a logging libraries? is log4j an api? or logging libraries?

cysun
Posts: 2935
Posted 17:23 Aug 03, 2015 |

1. No. Because slf4j is designed to be statically linked to a logging implementation, you have to have slf4j-log4j to "link" slf4j-api and log4j together.

2. I call libraries like slf4j logging API libraries, and libraries like log4j logging implementation libraries, so they are both logging libraries. During the lecture I may also have called logging implementation libraries just logging libraries for short.