public class LoggingDemo2 { static final Logger logger= LoggerFactory.getLogger(LoggingDemo2.class); public static void main(String[] args) { logger.info("start progress{}...",LoggingDemo2.class.getName()); try{ "".getBytes("invalidCharsetName"); }catch(UnsupportedEncodingException e){ logger.error(e.toString()); } logger.info("process end..."); }}
养成好习惯,将对应的jar包放在项目下创建的lib文件夹中。 同时将xml文件放在src文件夹下。然后手动添加库到项目中:
File
Project Structure
Ctrl+Alt+Shift+S
Modules
Dependencies
+
JARs or directories...
lib
Sign in to make a reply
张卿长
养成好习惯,将对应的jar包放在项目下创建的lib文件夹中。 同时将xml文件放在src文件夹下。然后手动添加库到项目中:
File
>Project Structure
或使用快捷键Ctrl+Alt+Shift+S
。Modules
然后在你的模块下选择Dependencies
标签。+
按钮,然后选择JARs or directories...
。lib
文件夹并选择 SLF4J 的 JAR 包。