Commons Logging priority best practices

前端 未结 6 942
一个人的身影
一个人的身影 2021-02-05 15:59

This may be a purely subjective question (if no organization has attempted to standardize this), but my team struggles with this more than you would think.

We use Apache

6条回答
  •  别跟我提以往
    2021-02-05 16:47

    If you are looking for a simple recommendation that is supported by the industry, why not just look at the industry simple implementation/documentation?

    We use a logback/log4j API as a logging level guide => which makes it simple / documented / supported by the industry:

    • Level ALL has the lowest possible rank and is intended to turn on all logging.

    • Level DEBUG designates fine-grained informational events that are most useful to debug an application.

    • Level ERROR designates error events that might still allow the application to continue running.

    • Level FATAL designates very severe error events that will presumably lead the application to abort.

    • Level INFO designates informational messages that highlight the progress of the application at coarse-grained level.

    • Level OFF has the highest possible rank and is intended to turn off logging.

    • Level TRACE designates finer-grained informational events than the DEBUG

    • Level WARN designates potentially harmful situations.

提交回复
热议问题