@@ -5,7 +5,6 @@ const logger = new ACL({
5
5
includeTimestamps : true , // Include timestamps in all log messages.
6
6
includeMemoryUsage : true , // Track and display memory usage information in the logs.
7
7
memoryDisplayMode : 2 , // Memory display mode: (1 = MB, 2 = %, 3 = both MB and %).
8
- generateReport : true , // Generate a report at the end of the logging session showing log method usage statistics.
9
8
10
9
// Caller Information Settings
11
10
includeCallerInfo : 1 , // Enable the inclusion of caller information (file, line, and column) in log messages.
@@ -16,15 +15,23 @@ const logger = new ACL({
16
15
17
16
// Inline Caller Information Settings
18
17
includeInlineCallerInfo : 1 , // Display inline caller information within the log message (quick debugging reference).
19
- inlineCallerInfoLevel : 3 , // Minimum log level to include inline caller information (similar to `callerInfoLevel`) .
18
+ inlineCallerInfoLevel : 3 , // Inline caller information level that controls the inline display of caller information .
20
19
21
20
terminateOnFatal : true , // Terminate the application on a `fatal` log message.
22
21
} ) ;
23
22
24
- // Logging with different levels to demonstrate color differences
25
- logger . debug ( "This is a debug message." ) ;
26
- logger . log ( "This is a regular log message." ) ;
27
- logger . info ( "This is an informational message." ) ;
28
- logger . warn ( "This is a warning message, it will include caller information." ) ;
29
- logger . error ( "This is an error message, it will include caller information." ) ;
30
- logger . fatal ( "This is a fatal message, terminating the process." ) ;
23
+ function subFunction ( ) {
24
+ logger . log ( true , "This is a regular log message." ) ;
25
+ }
26
+
27
+ async function main ( ) {
28
+ // Logging with different levels to demonstrate color differences
29
+ logger . debug ( "This is a debug message." ) ;
30
+ logger . log ( "This is a regular log message." ) ;
31
+ subFunction ( ) ;
32
+ logger . info ( "This is an informational message." ) ;
33
+ logger . warn ( "This is a warning message, it will include caller information." ) ;
34
+ logger . error ( "This is an error message, it will include caller information." ) ;
35
+ logger . fatal ( "This is a fatal message, terminating the process." ) ;
36
+ }
37
+ main ( ) ;
0 commit comments