FCF 2.0 development in progress...
> > > > > >
[News] [Packages API] [Downloads] [Donate to the project] [Contacts]

"message_after" event of base class fcf.EventEmitter (class fcf.Logger)

Event: message_after

Package: fcf-framework-core

Available from version: 2.0.2

Message logging event. Called after output

Event arguments
object a_info
- information object
  • integer level - Logging level

  • string module - The name of the module from which the logging is called

  • string output - Prefixed output message (populated by handlers)

  • string message - Displaying a message without prefixes (filled in by the fcf.Logger.messageHandler handler)

  • [mixed] args - Arguments passed to logger for output

  • fcf.Logger logger - Pointer to logger object

  • boolean break - If true, then further execution of handlers is interrupted

Example: Application

fcf.log.on("message_after", (a_info)=>{ console.log(a_info.message); }); fcf.log.tst("Application", "Hello world!");

Output:

2023-04-18 06:39:51.486 [PID:16991] [TST] [MOD:Application]: Hello world! Hello world!