Topic
5 replies Latest Post - ‏2012-07-16T05:58:09Z by SystemAdmin
SystemAdmin
SystemAdmin
6772 Posts
ACCEPTED ANSWER

Pinned topic Reading log files in datapower

‏2012-07-12T08:27:07Z |
Is there any way to read on device log files (default or custom) within an xsl
Updated on 2012-07-16T05:58:09Z at 2012-07-16T05:58:09Z by SystemAdmin
  • nmmanisk
    nmmanisk
    16 Posts
    ACCEPTED ANSWER

    Re: Reading log files in datapower

    ‏2012-07-12T11:34:53Z  in response to SystemAdmin
    I'm not sure what your use case is but you can choose a file type log target to output XML nodes for each event. The file is then a list of these elements. The document is not valid XML since there is no root node, so you would need to add the root node before you could run a stylesheet against it.

    Regards,
    Nicholas Maniskas
  • SystemAdmin
    SystemAdmin
    6772 Posts
    ACCEPTED ANSWER

    Re: Reading log files in datapower

    ‏2012-07-13T11:08:10Z  in response to SystemAdmin
    I actually need to read logtemp://default-log-xml file in an xsl document and do transformation based on the logged information.Just want to know if it is possible to do it on device.Also is it possible to read any ".log" file withing an xsl.
    • HermannSW
      HermannSW
      4135 Posts
      ACCEPTED ANSWER

      Re: Reading log files in datapower

      ‏2012-07-13T15:00:40Z  in response to SystemAdmin
      Hi,

      > I actually need to read logtemp://default-log-xml file in an xsl document and do transformation
      > based on the logged information.Just want to know if it is possible to do it on device.
      >
      yes, its possible, please see new posting reading "logtemp:///default-log-xml" in a stylesheet:
      https://www.ibm.com/developerworks/mydeveloperworks/blogs/HermannSW/entry/reading_logtemp_default_log_xml_in_a_stylesheet17
      https://t.co/XAwuvzoo (above URL is too long for this forum)

      > Also is it possible to read any ".log" file withing an xsl.
      >
      Yes, but then the log entries are only "text" and you need to do the complete parsing yourself -- of course you can do that ;-)

       
      Hermann<myXsltBlog/> <myXsltTweets/>
      • HermannSW
        HermannSW
        4135 Posts
        ACCEPTED ANSWER

        Re: Reading log files in datapower

        ‏2012-07-15T14:37:09Z  in response to HermannSW
        > > Also is it possible to read any ".log" file withing an xsl.
        >
        > Yes, but then the log entries are only "text" and you need to do the complete parsing yourself -- of course you can do that ;-)
        >
        I updated the blog posting, the 2nd stylesheet shows how to read and process Non-XML .log files.

         
        Hermann<myXsltBlog/> <myXsltTweets/>
  • SystemAdmin
    SystemAdmin
    6772 Posts
    ACCEPTED ANSWER

    Re: Reading log files in datapower

    ‏2012-07-16T05:58:09Z  in response to SystemAdmin
    Thanks Hermann:).you made the whole thing so easy