Skip to content

Commit 9729168

Browse files
rakillenddsharpe
authored andcommitted
JIRA WDT-349 - Add path information to logging for error setting attribute (#420)
1 parent 4b7a53f commit 9729168

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

core/src/main/python/wlsdeploy/tool/util/wlst_helper.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,13 @@ def set(self, attribute_name, attribute_value, masked=False):
147147
try:
148148
wlst_helper.set(attribute_name, attribute_value)
149149
except PyWLSTException, pwe:
150+
path = self.get_pwd()
150151
log_value = attribute_value
151152
if masked:
152153
log_value = '<masked>'
153-
ex = exception_helper.create_exception(self.__exception_type, 'WLSDPLY-19102', attribute_name, log_value,
154-
pwe.getLocalizedMessage(), error=pwe)
154+
155+
ex = exception_helper.create_exception(self.__exception_type, 'WLSDPLY-19102', attribute_name, path,
156+
log_value, pwe.getLocalizedMessage(), error=pwe)
155157
self.__logger.throwing(ex, class_name=self.__class_name, method_name=_method_name)
156158
raise ex
157159
return
@@ -169,11 +171,13 @@ def set_with_cmo(self, attribute_name, attribute_value, masked=False):
169171
try:
170172
wlst_helper.set_with_cmo(attribute_name, attribute_value, masked=masked)
171173
except PyWLSTException, pwe:
174+
path = self.get_pwd()
172175
log_value = attribute_value
173176
if masked:
174177
log_value = '<masked>'
175-
ex = exception_helper.create_exception(self.__exception_type, 'WLSDPLY-19136', attribute_name, log_value,
176-
pwe.getLocalizedMessage(), error=pwe)
178+
179+
ex = exception_helper.create_exception(self.__exception_type, 'WLSDPLY-19136', attribute_name, path,
180+
log_value, pwe.getLocalizedMessage(), error=pwe)
177181
self.__logger.throwing(ex, class_name=self.__class_name, method_name=_method_name)
178182
raise ex
179183
return

core/src/main/resources/oracle/weblogic/deploy/messages/wlsdeploy_rb.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1271,7 +1271,7 @@ WLSDPLY-19039=Failed to convert the wlst attribute name to the model name at loc
12711271
# wlsdeploy/tool/util/wlst_helper.py
12721272
WLSDPLY-19100=Failed to change to the WLST directory {0}: {1}
12731273
WLSDPLY-19101=Failed to get value for attribute {0}: {1}
1274-
WLSDPLY-19102=Failed to set attribute {0} to value {1}: {2}
1274+
WLSDPLY-19102=Failed to set attribute {0} in path {1} to value {2}: {3}
12751275
WLSDPLY-19103=Failed to create new MBean of type {0} and name {1}: {2}
12761276
WLSDPLY-19104=Failed to create and cd for MBean type {0} with name {1}: {2}
12771277
WLSDPLY-19105=Failed to get the list of WLST directory names: {0}
@@ -1305,7 +1305,7 @@ WLSDPLY-19132=Failed to activate changes: {0}
13051305
WLSDPLY-19133=Failed to disconnect: {0}
13061306
WLSDPLY-19134=Failed to create new security {0} MBean of type {1} and name {2}: {3}
13071307
WLSDPLY-19135=Failed to delete MBean of type {0} and name {1}: {2}
1308-
WLSDPLY-19136=Failed to set attribute {0} to value {1} using the cmo set method: {2}
1308+
WLSDPLY-19136=Failed to set attribute {0} in path {1} to value {2} using the cmo set method: {3}
13091309
WLSDPLY-19137=Failed to deploy application {0}: {1}
13101310
WLSDPLY-19138=Failed to redeploy application {0}:{1}
13111311
WLSDPLY-19139=Failed to start application {0}: {1}

0 commit comments

Comments
 (0)