<dependency> <groupId>org.stagemonitor</groupId> <artifactId>stagemonitor-core</artifactId> </dependency> import org.stagemonitor.core.Stagemonitor; public class Main { public static void main(String[] args) { Stagemonitor.init(); // your application code here } } properties stagemonitor.errorcollector.enabled=true import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class MyClass { private static final Logger logger = LoggerFactory.getLogger(MyClass.class); public void myMethod() { try { // your code here } catch (Exception e) { logger.error("An error occurred", e); } } }


上一篇:
下一篇:
切换中文