Products | Versions |
---|---|
Spotfire Server | 7.8 and above |
Below are the steps required to add custom logs to custom Custom Authentication or AuthenticationFilter code.
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger;And at the beginning of the class add:
protected static Logger log = LogManager.getLogger(CustomClassName.class);Resulting in, for example:
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; public class CustomClassName { protected static Logger log = LogManager.getLogger(CustomClassName.class); ... }
log.debug("In CustomClassName");
<Logger name="com.security.customfilter" level="DEBUG" additivity="false"> <AppenderRef ref="serverlog"/> </Logger>