The IServerInterceptorLogger interface enables service interceptors to write log messages to the ArcGIS Server log system. This is useful for monitoring, troubleshooting, and auditing custom interceptor logic.
Supported log levels
Service interceptors can log messages at various levels:
-
info(String)
-
debug(String)
-
warning(String)
-
severe(String)
-
log(Level, String) or log(Level, Exception)
These logs provide valuable insights into the interceptor's execution, helping to identify issues during development or runtime.
logger.info("AuditLogInterceptor initialized with logLevel=INFO");
logger.warning("Request body is missing required parameter.");
logger.log(LogLevel.SEVERE, exception);
Viewing logs in ArcGIS Server
Logs written by service interceptors are integrated into the standard ArcGIS Server logging system and can be accessed through the ArcGIS Server Administrative Directory. To access these logs, sign in to the Administrative Directory and click Home > logs > query. In the results, logs that are generated by server interceptors will have a Target value of Enterprise Interceptor, making it easy for administrators to distinguish interceptor logs from other system logs. The log code for interceptor logs is 7777.
