README revision 4b3769ce483ece06f60f983193712492b920144f
4d237bbe075b1d2c19428cd954d721d65b31f67cwroweLogging in Scripts Sample
0e2a2eae9b72ac099aa25d7419e55af13b004be9minfrin-------------------------
1a5f954324f2584984fc9cee7a7a8ebe8ef39aeajimCopyright (c) 2012 ForgeRock AS
0e2a2eae9b72ac099aa25d7419e55af13b004be9minfrinThis work is licensed under a Creative Commons Attribution-
0e2a2eae9b72ac099aa25d7419e55af13b004be9minfrinNonCommercial-NoDerivs 3.0 Unported License. See
0e2a2eae9b72ac099aa25d7419e55af13b004be9minfrinhttp://creativecommons.org/licenses/by-nc-nd/3.0/
0e2a2eae9b72ac099aa25d7419e55af13b004be9minfrin
0e2a2eae9b72ac099aa25d7419e55af13b004be9minfrinThis sample demonstrates logging capabilities available to OpenIDM scripts,
0e2a2eae9b72ac099aa25d7419e55af13b004be9minfrinproviding you an alternative method for debugging your scripts.
557b032cb4aa7f7dd009066b660022910b2e78b6pquerna
557b032cb4aa7f7dd009066b660022910b2e78b6pquernaFor documentation pertaining to this example see:
557b032cb4aa7f7dd009066b660022910b2e78b6pquernahttp://openidm.forgerock.org/doc/install-guide/index.html#more-sample8
557b032cb4aa7f7dd009066b660022910b2e78b6pquerna
b39ba1ea90cd1940dcd9e8d0f18c1ff02c187ac1jimTo try the sample, follow these steps.
6f33babce8f8bc723f0b2c755aef049cd509504fpquerna
6f33babce8f8bc723f0b2c755aef049cd509504fpquerna 1. Start OpenIDM with the configuration for sample 8.
0a12339f39799193ac6866fce812a1deb8f4a1abpquerna
0a12339f39799193ac6866fce812a1deb8f4a1abpquerna $ cd /path/to/openidm
0a12339f39799193ac6866fce812a1deb8f4a1abpquerna $ ./startup.sh -p samples/sample8
3fb118bc4e1a634f71c1fa509819ceac36c79dcbpquerna
3fb118bc4e1a634f71c1fa509819ceac36c79dcbpquerna 2. Run reconciliation.
3fb118bc4e1a634f71c1fa509819ceac36c79dcbpquerna
fb59af4ce3fcdd314b848359faeddf1e51bb24c5jim $ curl -k -u openidm-admin:openidm-admin -X POST "https://localhost:8443/openidm/recon?_action=recon&mapping=systemXmlfileAccounts_managedUser"
fb59af4ce3fcdd314b848359faeddf1e51bb24c5jim
fb59af4ce3fcdd314b848359faeddf1e51bb24c5jim 3. Observe messages from your scripts that are logged to the OpenIDM
fb59af4ce3fcdd314b848359faeddf1e51bb24c5jim (Felix) console:
a91a59d0b0ceed7cd5621fe8757eda5ff6a043a8pquerna
a91a59d0b0ceed7cd5621fe8757eda5ff6a043a8pquerna 2012-12-10 21:53:08:691 WARN Case no Source: the source object contains: = null [js]
a91a59d0b0ceed7cd5621fe8757eda5ff6a043a8pquerna 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]
a91a59d0b0ceed7cd5621fe8757eda5ff6a043a8pquerna 2012-12-10 21:53:08:694 WARN Case sourceDescription: the source object contains: = Created By XML1 [js]
a91a59d0b0ceed7cd5621fe8757eda5ff6a043a8pquerna 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]
a91a59d0b0ceed7cd5621fe8757eda5ff6a043a8pquerna 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]
a91a59d0b0ceed7cd5621fe8757eda5ff6a043a8pquerna
a91a59d0b0ceed7cd5621fe8757eda5ff6a043a8pquerna Read the short scripts in samples/sample8/script/ to see examples of how
a91a59d0b0ceed7cd5621fe8757eda5ff6a043a8pquerna to use the logger object.
a91a59d0b0ceed7cd5621fe8757eda5ff6a043a8pquerna