README revision 245d622535c32563b59ef5027b1171167ba9b451
4d237bbe075b1d2c19428cd954d721d65b31f67cwroweLogging in Scripts Sample
df46ff21c57d00f6addccaaf9b1484f2b56b8577pquerna-------------------------
7f4ac5a4cd99a9cae866b5908e358bd932736307chrisdCopyright (c) 2012 ForgeRock AS
3e9c0665b06e44cf776528c6954ed3ca34a77c7fsctemmeThis work is licensed under a Creative Commons Attribution-
51a475d92e7d68ee6d7b57aa7fd6e73b2712ce31sctemmeNonCommercial-NoDerivs 3.0 Unported License. See
873c287c391b0bbc4719b68bb84946515811e1batrawickThis sample demonstrates logging capabilities available to OpenIDM scripts,
6707208ba4e9a5841ca1ab830830fd286ea5b7c5trawickproviding you an alternative method for debugging your scripts.
873c287c391b0bbc4719b68bb84946515811e1batrawickFor documentation pertaining to this example see:
832853bb93c1831daf24e4727c5ca0e1b1786e83larshttp://openidm.forgerock.org/doc/install-guide/index.html#more-sample8
832853bb93c1831daf24e4727c5ca0e1b1786e83larsTo try the sample, follow these steps.
d2696ac6757b3d8bdaa27634a141ac8c8a045e08fielding 1. Start OpenIDM with the configuration for sample 8.
d2696ac6757b3d8bdaa27634a141ac8c8a045e08fielding 2. Run reconciliation.
abc69b39766c0de3eaf99e9016ea3f35e23c116drpluem $ curl -u openidm-admin:openidm-admin -X POST "http://localhost:8080/openidm/recon?_action=recon&mapping=systemXmlfileAccounts_managedUser"
59dc8d935dbf862712683bbc9e267bd08ced0b14fielding 3. Observe messages from your scripts that are logged to the OpenIDM
abc69b39766c0de3eaf99e9016ea3f35e23c116drpluem (Felix) console:
abc69b39766c0de3eaf99e9016ea3f35e23c116drpluem 2012-12-10 21:53:08:691 WARN Case no Source: the source object contains: = null [js]
abc69b39766c0de3eaf99e9016ea3f35e23c116drpluem 2012-12-10 21:53:08:693 WARN Case emptySource: the source object contains: = {name=DDOE1, firstname=Darth1, __UID__=1, email=[mail1@example.com], description=Created By XML1, lastname=Doe1, _id=1} [js]
cf8d02ea0c91653917b044529f3133c5a1bb9200fielding 2012-12-10 21:53:08:694 WARN Case sourceDescription: the source object contains: = Created By XML1 [js]
abc69b39766c0de3eaf99e9016ea3f35e23c116drpluem 2012-12-10 21:53:08:695 WARN Case onCreate: the source object contains: = {name=DDOE1, firstname=Darth1, __UID__=1, email=[mail1@example.com], description=Created By XML1, lastname=Doe1, _id=1} [js]
abc69b39766c0de3eaf99e9016ea3f35e23c116drpluem 2012-12-10 21:53:08:817 WARN Case result: the source object contains: = {SOURCE_IGNORED={count=0, ids=[]}, UNQUALIFIED={count=0, ids=[]}, NOTVALID={count=0, ids=[]}, processed=1, UNASSIGNED={count=0, ids=[]}, TARGET_IGNORED={count=0, ids=[]}, CONFIRMED={count=0, ids=[]}, AMBIGUOUS={count=0, ids=[]}, ABSENT={count=1, ids=[1]}, MISSING={count=0, ids=[]}, SOURCE_MISSING={count=0, ids=[]}, FOUND={count=0, ids=[]}} [js]
abc69b39766c0de3eaf99e9016ea3f35e23c116drpluem Read the short scripts in samples/sample8/script/ to see examples of how
abc69b39766c0de3eaf99e9016ea3f35e23c116drpluem to use the logger object.