Skip to content

Commit e865ecf

Browse files
committed
feat: Example > Generate Report
1 parent d3c8685 commit e865ecf

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

examples/generate-report.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
const ACL = require("../index");
2+
3+
// Create a logger instance with custom color configuration
4+
const logger = new ACL({
5+
generateReport: true, // Generate a report at the end of the logging session showing log method usage statistics.
6+
});
7+
8+
// Logging with different levels to demonstrate color differences
9+
logger.debug("This is a debug message.");
10+
logger.log("This is a regular log message.");
11+
logger.info("This is an informational message.");
12+
logger.warn("This is a warning message, it will include caller information.");
13+
logger.error("This is an error message, it will include caller information.");
14+
logger.fatal("This is a fatal message, terminating the process.");
15+
16+
logger.report();

0 commit comments

Comments
 (0)