Shall we have two logs prior to action and after success or failure of the action. And I am suggesting to have logs like User XXX triggered action YYY Action YYY triggered by User XXX successfully completed Error occurred while processing Action YYY triggered by User XXX
WDYT? Thanks & Regards Danushka Fernando Senior Software Engineer WSO2 inc. http://wso2.com/ Mobile : +94716332729 On Mon, Jul 4, 2016 at 10:57 AM, Amalka Subasinghe <ama...@wso2.com> wrote: > Added above mentioned code block to the router.jag file > Then the logs will be printed as... > > [2016-07-04 10:48:00,050] INFO - User : ad...@wso2.com, Action : > createDatabaseAndAttachUser > [2016-07-04 10:48:06,300] INFO - User : ad...@wso2.com, Action : > dropDatabase > [2016-07-04 10:48:08,406] INFO - User : ad...@wso2.com, Action : > dropDatabase > [2016-07-04 10:48:15,675] INFO - User : ad...@wso2.com, Action : > createDatabaseAndAttachUser > [2016-07-04 10:48:24,817] INFO - User : ad...@wso2.com, Action : > createDatabaseUser > > > > On Sun, Jul 3, 2016 at 4:17 PM, Mahesh Chinthaka <mahe...@wso2.com> wrote: > >> Hi Amalka, >> >> All the requests/actions go through it (router.jag). >> >> >> >> On Sun, Jul 3, 2016 at 7:16 AM, Amalka Subasinghe <ama...@wso2.com> >> wrote: >> >>> Hi, >>> >>> We can log adding following to the jaggery. >>> >>> var audit = org.wso2.carbon.CarbonConstants.AUDIT_LOG; >>> audit.info("User : " + jagg.getUser() + ", Action : " + action); >>> >>> Here. I want to log who is the user logged in and what action he called. >>> Would it be ok to add this code to the router jag in app cloud? As I >>> know all requests/actions go through it. am I right? >>> >>> Thanks >>> Amalka >>> >>> On Fri, Jul 1, 2016 at 12:13 PM, Amalka Subasinghe <ama...@wso2.com> >>> wrote: >>> >>>> Hi, >>>> >>>> I have a Jaggery app deployed in WSO2AS, I want to log user activities >>>> via block layer to a separate file (to audit.log). >>>> Please help. >>>> >>>> Thanks >>>> Amalka >>>> >>>> >>> >>> >>> -- >>> Amalka Subasinghe >>> >>> WSO2 Inc. >>> Mobile: +94 77 9401267 >>> >> >> >> >> -- >> *Mahesh Chinthaka Vidanagama* | Software Engineer >> WSO2, Inc | lean. enterprise. middleware. >> #20, Palm Grove, Colombo 03, Sri Lanka >> Mobile: +94 71 63 63 083 | Work: +94 112 145 345 >> Email: mahe...@wso2.com | Web: www.wso2.com >> > > > > -- > Amalka Subasinghe > > WSO2 Inc. > Mobile: +94 77 9401267 > > _______________________________________________ > 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