Logging with multiple parameters

后端 未结 3 877
你的背包
你的背包 2021-02-07 00:49

I am currently working on a program wherein, I must write all output to a log file.

I need to write a log method, that should give an output with a level, a message, an

3条回答
  •  野性不改
    2021-02-07 01:22

    We used below code while using slf4j logger -

    logger.error("Error while finding A from DB. a : {} and b : {}", a, b);
    logger.info("Nothing found in db for A with a : {} and b : {}", a, b);
    

提交回复
热议问题