@@ -34,7 +34,6 @@ public class AdminRestBundle extends UniqueGuiceyBundle {
3434 private final Logger logger = LoggerFactory .getLogger (AdminRestBundle .class );
3535
3636 private final String path ;
37- private boolean identifyAdminContext ;
3837
3938 /**
4039 * Admin rest will be mapped on the same path as main rest if rest mapping is different from '/*'.
@@ -54,28 +53,6 @@ public AdminRestBundle(final String path) {
5453 this .path = path ;
5554 }
5655
57- /**
58- * Shortcut for {@code identifyAdminPathsInRequestLogs(true)}.
59- *
60- * @return bundle instance
61- */
62- public AdminRestBundle identifyAdminContextInRequestLogs () {
63- return identifyAdminContextInRequestLogs (true );
64- }
65-
66- /**
67- * As admin rest just redirects to main context rest, then all admin rest calls would be logged. It might
68- * be hard to identify admin calls in such logs (if rest contexts are the same and resources used from both
69- * contexts). When enabled, " (ADMIN REST)" string is appended for loggable request uri.
70- *
71- * @param identifyAdminPathsInRequestLogs true to identify admin calls in request logs
72- * @return bundle instance
73- */
74- public AdminRestBundle identifyAdminContextInRequestLogs (final boolean identifyAdminPathsInRequestLogs ) {
75- this .identifyAdminContext = identifyAdminPathsInRequestLogs ;
76- return this ;
77- }
78-
7956 @ Override
8057 public void run (final GuiceyEnvironment environment ) throws Exception {
8158 environment .manage (new ServletRegistration (environment .environment ()));
@@ -91,7 +68,7 @@ private void registerServlet(final String path, final Environment environment) {
9168 // In admin context LogbackAccessRequestLogAwareHandler not registered, but our admin servlet calls
9269 // the main context, which will trigger LogbackAccessRequestLog, but without a proper handler it would fail
9370 environment .getAdminContext ()
94- .insertHandler (new LogbackAccessRequestLogAwareCustomHandler (identifyAdminContext ));
71+ .insertHandler (new LogbackAccessRequestLogAwareCustomHandler ());
9572 logger .info ("Admin REST registered on path: {}" , path );
9673 }
9774
0 commit comments