Hi Abimaran, If you run this test case on DEBUG mode and execute the bellow line LogEvent[] timeoutLogs = logViewerClient.getLogs("WARN", "TimeoutHandler", "", "AM"); Do you get the needed information.(execute this few times, and check whether you get the log ) ?
IF this happens, you have to implement the log reading task inside a loop. You have to try several time keeping small thread sleeps until you get the needed log information. Put a max wait time to the loop as a threshold. Thanks and Best Regards, Saneth Dharmakeerthi Senior Software Engineer WSO2, Inc. Mobile: +94772325511 On Thu, Oct 8, 2015 at 5:24 PM, Abimaran Kugathasan <abima...@wso2.com> wrote: > HI Waruna, > > This is for APIM 1.6.0 which uses automation framewotk version 4.2.1. > > LogViewerClient has these below methods only in that version. > > getLogs(String logType, String searchKey, String domain, String > serverKey), > getServiceNames(), > getAllSystemLogs(), > clearLogs() > > > On Thu, Oct 8, 2015 at 5:15 PM, Waruna Perera <waru...@wso2.com> wrote: > >> Hi, >> >> getLogs is deprecated now. Can you use getRemoteLogs and see the result? >> >> >> https://github.com/wso2/carbon-platform-integration-utils/blob/94f80cd6e2352ac832c40d572562407c3963ee0f/common-admin-clients/src/main/java/org/wso2/carbon/integration/common/admin/client/LogViewerClient.java >> >> On Thu, Oct 8, 2015 at 4:58 PM, Abimaran Kugathasan <abima...@wso2.com> >> wrote: >> >>> Hi Waruna, >>> >>> Thanks for the reply. >>> >>> No, I didn't use time delay. I have attached the class. >>> >>> On Thu, Oct 8, 2015 at 4:53 PM, Waruna Perera <waru...@wso2.com> wrote: >>> >>>> Hi, >>>> >>>> Do you use in time delay in between get all logs? Please provide the >>>> full code block. Some times in our test cases we use time out delays to get >>>> logs. >>>> >>>> Thanks, >>>> >>>> Waruna >>>> >>>> On Thu, Oct 8, 2015 at 3:08 PM, Abimaran Kugathasan <abima...@wso2.com> >>>> wrote: >>>> >>>>> Any updates on this? >>>>> >>>>> On Thu, Oct 8, 2015 at 12:51 PM, Abimaran Kugathasan < >>>>> abima...@wso2.com> wrote: >>>>> >>>>>> Hi, >>>>>> >>>>>> I want to get a log from a perticular class. I have >>>>>> used LogViewerClient. Please check my below code snaps. >>>>>> >>>>>> I need to get the below log. >>>>>> >>>>>> [2015-10-08 12:35:38,966] WARN - TimeoutHandler Expiring message ID >>>>>>> : urn:uuid:354104e6-eea7-41fd-88c7-de19d0b5a27f; dropping message after >>>>>>> timeout of : 10 seconds >>>>>> >>>>>> >>>>>> >>>>>> // Initialized the client >>>>>> >>>>>> LogViewerClient logViewerClient = new >>>>>> LogViewerClient(amServer.getBackEndUrl(), amServer.getSessionCookie()); >>>>>> >>>>>> // Calling it with parameters >>>>>> >>>>>> LogEvent[] timeoutLogs = logViewerClient.getLogs("WARN", >>>>>> "TimeoutHandler", "", "AM"); >>>>>> >>>>>> This returns empty array. >>>>>> >>>>>> >>>>>> I could get the system logs through below method. >>>>>> >>>>>> LogEvent[] logEvents = logViewerClient.getAllSystemLogs(); >>>>>> >>>>>> >>>>>> How can I get above mention log? >>>>>> >>>>>> >>>>>> -- >>>>>> >>>>>> Thanks >>>>>> Abimaran Kugathasan >>>>>> >>>>>> Software Engineer | WSO2 Inc >>>>>> Data & APIs Technologies Team >>>>>> Mobile : +94 773922820 >>>>>> >>>>>> <http://stackoverflow.com/users/515034> >>>>>> <http://lk.linkedin.com/in/abimaran> >>>>>> <http://www.lkabimaran.blogspot.com/> <https://github.com/abimarank> >>>>>> <https://twitter.com/abimaran> >>>>>> >>>>>> >>>>> >>>>> >>>>> -- >>>>> Thanks >>>>> Abimaran Kugathasan >>>>> >>>>> Software Engineer | WSO2 Inc >>>>> Data & APIs Technologies Team >>>>> Mobile : +94 773922820 >>>>> >>>>> <http://stackoverflow.com/users/515034> >>>>> <http://lk.linkedin.com/in/abimaran> >>>>> <http://www.lkabimaran.blogspot.com/> <https://github.com/abimarank> >>>>> <https://twitter.com/abimaran> >>>>> >>>>> >>>>> _______________________________________________ >>>>> Dev mailing list >>>>> Dev@wso2.org >>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>>>> >>>>> >>>> >>>> >>>> -- >>>> Waruna Perera >>>> Senior Software Engineer - Test Automation >>>> Mobile: +94 77 3867037 >>>> WSO2, Inc.; http://wso2.com/ >>>> lean . enterprise . middlewear. >>>> >>> >>> >>> >>> -- >>> Thanks >>> Abimaran Kugathasan >>> >>> Software Engineer | WSO2 Inc >>> Data & APIs Technologies Team >>> Mobile : +94 773922820 >>> >>> <http://stackoverflow.com/users/515034> >>> <http://lk.linkedin.com/in/abimaran> >>> <http://www.lkabimaran.blogspot.com/> <https://github.com/abimarank> >>> <https://twitter.com/abimaran> >>> >>> >> >> >> -- >> Waruna Perera >> Senior Software Engineer - Test Automation >> Mobile: +94 77 3867037 >> WSO2, Inc.; http://wso2.com/ >> lean . enterprise . middlewear. >> > > > > -- > Thanks > Abimaran Kugathasan > > Software Engineer | WSO2 Inc > Data & APIs Technologies Team > Mobile : +94 773922820 > > <http://stackoverflow.com/users/515034> > <http://lk.linkedin.com/in/abimaran> > <http://www.lkabimaran.blogspot.com/> <https://github.com/abimarank> > <https://twitter.com/abimaran> > > > _______________________________________________ > Dev mailing list > Dev@wso2.org > http://wso2.org/cgi-bin/mailman/listinfo/dev > >
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev