Topic
  • 6 replies
  • Latest Post - ‏2019-08-15T17:22:54Z by swlinn
6QMG_Elayaraja_Kathirvel
82 Posts

Pinned topic GatewayScript & Custom log category

‏2015-07-01T05:34:47Z |

Hi All,

 

As we know that we can write logs to specific log category using xslt as below

        <xsl:message dp:type="Application1" dp:priority="debug">
            <xsl:copy-of select="." />
        </xsl:message>

 

Can you please help me that how to do the same using GatewayScript?

Thanks

Raja

Updated on 2015-07-01T05:36:30Z at 2015-07-01T05:36:30Z by 6QMG_Elayaraja_Kathirvel
  • librah
    librah
    9 Posts

    Re: GatewayScript & Custom log category

    ‏2015-07-01T07:55:34Z  

    Raja,

    Please refer to https://www-01.ibm.com/support/knowledgecenter/SS9H2Y_7.2.0/com.ibm.dp.doc/console_js.html%23console.options

    Here is an example:

    
    var logger = console.options({'category':'Application1'}); // returns a new console object logging to 'Application1' category
    logger.debug('your message');
    
  • swlinn
    swlinn
    1445 Posts

    Re: GatewayScript & Custom log category

    ‏2015-07-01T13:43:14Z  

    Note, the feature described by Libra is new to version 7.2.  It is not available in 7.0 or 7.1.

    Regards,

    Steve

    Updated on 2015-07-01T13:43:29Z at 2015-07-01T13:43:29Z by swlinn
  • 6QMG_Elayaraja_Kathirvel
    82 Posts

    Re: GatewayScript & Custom log category

    ‏2015-07-01T21:30:59Z  
    • swlinn
    • ‏2015-07-01T13:43:14Z

    Note, the feature described by Libra is new to version 7.2.  It is not available in 7.0 or 7.1.

    Regards,

    Steve

    Hi Librah, Swlinn,

    Thanks for your help. We have upgraded to 7.2 and working fine.

    Regards,

    Raja

  • SurendrakumarJebakani
    33 Posts

    Re: GatewayScript & Custom log category

    ‏2019-08-09T16:31:49Z  
    • swlinn
    • ‏2015-07-01T13:43:14Z

    Note, the feature described by Libra is new to version 7.2.  It is not available in 7.0 or 7.1.

    Regards,

    Steve

    Hi Steve, 

    Is there a way to log the message to specific log category in 7.0 using Gateway script? I dont see console.options there. Please let me know.

     

    Thanks for the help

     

    Surendra

  • kenhygh
    kenhygh
    2519 Posts

    Re: GatewayScript & Custom log category

    ‏2019-08-10T10:28:06Z  

    Hi Steve, 

    Is there a way to log the message to specific log category in 7.0 using Gateway script? I dont see console.options there. Please let me know.

     

    Thanks for the help

     

    Surendra

    var myLogger = console.options({'category': 'MyLogCategory'});

    myLogger.info('Info');

  • swlinn
    swlinn
    1445 Posts

    Re: GatewayScript & Custom log category

    ‏2019-08-15T17:22:54Z  
    • kenhygh
    • ‏2019-08-10T10:28:06Z

    var myLogger = console.options({'category': 'MyLogCategory'});

    myLogger.info('Info');

    Hi Surendra,

    No, this capability was new to version 7.2.  It is not available in 7.0 or 7.1.  By the way, 7.0 was out of service starting 9/30/2017!   Even 7.6 will be end of service at the end of this year.  See https://www-01.ibm.com/support/docview.wss?uid=swg21246298 for firmware release cycles.  I suggest you upgrade to the latest release and you'll have this function as well as a number of years of fixes and enhancements.  I'd be concerned with the security vulnerabilities that have been fixed in subsequent releases that you are missing.

    Best Regards,
    Steve