You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@juneau.apache.org by ja...@apache.org on 2020/01/02 19:01:50 UTC
[juneau] branch master updated: JUNEAU-172
@RestResource(debug=true) doesn't work if REST method not matched.
This is an automated email from the ASF dual-hosted git repository.
jamesbognar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/juneau.git
The following commit(s) were added to refs/heads/master by this push:
new dde0bb2 JUNEAU-172 @RestResource(debug=true) doesn't work if REST method not matched.
dde0bb2 is described below
commit dde0bb238d0d4dfc1ad02f0ba304b75c14cc2314
Author: JamesBognar <ja...@apache.org>
AuthorDate: Thu Jan 2 14:01:32 2020 -0500
JUNEAU-172 @RestResource(debug=true) doesn't work if REST method not
matched.
---
.../main/java/org/apache/juneau/rest/RestContext.java | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestContext.java b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestContext.java
index b02df69..95a27e0 100644
--- a/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestContext.java
+++ b/juneau-rest/juneau-rest-server/src/main/java/org/apache/juneau/rest/RestContext.java
@@ -3694,13 +3694,17 @@ public final class RestContext extends BeanContext {
logger = getInstanceProperty(REST_logger, resource, RestLogger.class, NoOpRestLogger.class, resourceResolver, this);
callLogger = getInstanceProperty(REST_callLogger, resource, RestCallLogger.class, BasicRestCallLogger.class, resourceResolver, this);
- Object clc = getProperty(REST_callLoggerConfig);
- if (clc instanceof RestCallLoggerConfig)
- this.callLoggerConfig = (RestCallLoggerConfig)clc;
- else if (clc instanceof ObjectMap)
- this.callLoggerConfig = RestCallLoggerConfig.create().apply((ObjectMap)clc).build();
- else
- this.callLoggerConfig = RestCallLoggerConfig.DEFAULT;
+ if (debug == Enablement.TRUE) {
+ this.callLoggerConfig = RestCallLoggerConfig.DEFAULT_DEBUG;
+ } else {
+ Object clc = getProperty(REST_callLoggerConfig);
+ if (clc instanceof RestCallLoggerConfig)
+ this.callLoggerConfig = (RestCallLoggerConfig)clc;
+ else if (clc instanceof ObjectMap)
+ this.callLoggerConfig = RestCallLoggerConfig.create().apply((ObjectMap)clc).build();
+ else
+ this.callLoggerConfig = RestCallLoggerConfig.DEFAULT;
+ }
properties = builder.properties;
serializers =