/** *Name:ts.test *Date:2024/8/27 *Author:18355 */ // const cc = require('../index') // import { get } from 'stack-trace'; import cc from "../index" // expect(trace[0].getFileName()).toBe(__filename); cc.setLogConfig({showTrace:true,level:'debug',traceLength:2}) console.log("=======111======") cc.log("log","bbb","ccc") cc.info("info","fff") cc.warn("warn","fff") cc.err("fff") cc.error("error","fff") cc.debug("rrrrr") // import { Logger } from "tslog"; // // const log = new Logger(); // log.silly("I am a silly log."); // log.trace("I am a trace log."); // log.debug("I am a debug log."); // log.info("I am an info log."); // log.warn("I am a warn log with a json object:", { foo: "bar" }); // log.error("I am an error log."); // // log.fatal(new Error("I am a pretty Error with a stacktrace.")); // // // // console.log("getCallerStackFrame0:",cc.tools.getCallerStackFrame(0)) // console.log("getCallerStackFrame1:",cc.tools.getCallerStackFrame(1)) // console.log("getCallerStackFrame2:",cc.tools.getCallerStackFrame(2)) // console.log("getCallerStackFrame3:",cc.tools.getCallerStackFrame(3))