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
3e9c0665b06e44cf776528c6954ed3ca34a77c7fsctemmehttp://creativecommons.org/licenses/by-nc-nd/3.0/
019f2b58acb34e31ea3a062bdb5e6c863cd82d66trawick
873c287c391b0bbc4719b68bb84946515811e1batrawickThis sample demonstrates logging capabilities available to OpenIDM scripts,
6707208ba4e9a5841ca1ab830830fd286ea5b7c5trawickproviding you an alternative method for debugging your scripts.
6707208ba4e9a5841ca1ab830830fd286ea5b7c5trawick
873c287c391b0bbc4719b68bb84946515811e1batrawickFor documentation pertaining to this example see:
832853bb93c1831daf24e4727c5ca0e1b1786e83larshttp://openidm.forgerock.org/doc/install-guide/index.html#more-sample8
832853bb93c1831daf24e4727c5ca0e1b1786e83lars
832853bb93c1831daf24e4727c5ca0e1b1786e83larsTo try the sample, follow these steps.
d2696ac6757b3d8bdaa27634a141ac8c8a045e08fielding
d2696ac6757b3d8bdaa27634a141ac8c8a045e08fielding 1. Start OpenIDM with the configuration for sample 8.
d2696ac6757b3d8bdaa27634a141ac8c8a045e08fielding
d2696ac6757b3d8bdaa27634a141ac8c8a045e08fielding $ cd /path/to/openidm
1782dcd420de504978945e6b812523eeae6d56a2lars $ ./startup.sh -p samples/sample8
1782dcd420de504978945e6b812523eeae6d56a2lars
d2696ac6757b3d8bdaa27634a141ac8c8a045e08fielding 2. Run reconciliation.
1782dcd420de504978945e6b812523eeae6d56a2lars
abc69b39766c0de3eaf99e9016ea3f35e23c116drpluem $ curl -u openidm-admin:openidm-admin -X POST "http://localhost:8080/openidm/recon?_action=recon&mapping=systemXmlfileAccounts_managedUser"
abc69b39766c0de3eaf99e9016ea3f35e23c116drpluem
59dc8d935dbf862712683bbc9e267bd08ced0b14fielding 3. Observe messages from your scripts that are logged to the OpenIDM
abc69b39766c0de3eaf99e9016ea3f35e23c116drpluem (Felix) console:
abc69b39766c0de3eaf99e9016ea3f35e23c116drpluem
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]
17ac330ebaa71b24cb77580411a231ee45996e03pquerna
abc69b39766c0de3eaf99e9016ea3f35e23c116drpluem Read the short scripts in samples/sample8/script/ to see examples of how
abc69b39766c0de3eaf99e9016ea3f35e23c116drpluem to use the logger object.
9f38f3ec3e8087985d108a24ae796962fef83644takashi