Forum Discussion

  • The tmsh help (tmsh help ilx plugin) says:

     

    log-publisher Specifies the log destination for messages generated by the ILXLogger nodejs object in an extension. See sys log-config publisher.

    So, it is essentially an HSL just like iRule's HSL::send (see Manual Chapter: Configuring Remote High-Speed Logging for how you create a log publisher).

     

    You can find some hints on the ILXLogger class in the code itself: e.g.,

     

    /var/ilx/workspaces///extensions//node_modules/f5-nodejs/lib/ilx_logger.js

    A sample code as below:

     

     

    var f5 = require('f5-nodejs');
    var plugin = new f5.ILXPlugin();
    var logger = new f5.ILXLogger();
    
    plugin.on('connect', function(flow) {
      logger.send('Hola Mundo');
    });
    
    // Start listening for new flows.
    var options = new f5.ILXPluginOptions(); // options are optional
    options.handleClientData = false;     // default true
    options.handleServerData = false;     // default true
    options.handleClientRequest = false;  // default true
    options.handleServerResponse = false;    // default true
    plugin.start(options);
    

     

    Once you created a log publisher, you can register it to the ILX plugin/extension from the GUI field Log Publisher (Local Traffic > iRules:LX Plugins > ).

    Unfortunately, the API Reference does not show anything on the ILXLogger yet. I will check if I can do something about it.