where does logger write to?
Stefano Zanmarchi
zanmarchi at gmail.com
Tue Sep 13 11:32:46 BST 2011
Solved,
I have added in logging.xml a new logger:
<logger name="edu.internet2.middleware.shibboleth.resolver.Script.testThree"><level
value="DEBUG"></logger>
I found the clue in
http://www.slf4j.org/api/org/slf4j/LoggerFactory.html#getLogger(java.lang.String)
but I think it could be useful to add this information to the wiki
(maybe in the "Logging Within a Script" section)
Best,
Stefano
On Mon, Sep 12, 2011 at 5:21 PM, Stefano Zanmarchi <zanmarchi at gmail.com> wrote:
> Hi,
> sorry for a probably silly question, but I can't figure out how to get it work.
> The following script is working just fine, the attribute is being
> released, but I can't find the file
> where the info method of the logger object is writing to.
> Do I have to enable something, like in logging.xml?
> Any help is greatly appreciated,
> thanks,
> Stefano
>
> <resolver:AttributeDefinition xsi:type="Script"
>
> xmlns="urn:mace:shibboleth:2.0:resolver:ad"
> id="testThree">
> <resolver:Dependency ref="virtualdirectory" />
> <resolver:AttributeEncoder xsi:type="enc:SAML2String"
> name="www.miotest.it/testThree" />
> <Script><![CDATA[
> importPackage(Packages.edu.internet2.middleware.shibboleth.common.attribute.provider);
> importPackage(Packages.org.slf4j);
> logger = LoggerFactory.getLogger("edu.internet2.middleware.shibboleth.resolver.Script.testThree");
> testThree = new BasicAttribute("testThree");
> if (typeof mailstud != "undefined") {
> logger.info("mailstud valorizzato a: " + mailstud.getValues());
> testThree.getValues().add(mailstud.getValues().get(0));
> }
> else {
> logger.info("mailstud non definita")
> testThree.getValues().add("N/D");
> }
> ]]></Script>
> </resolver:AttributeDefinition>
>
More information about the users
mailing list