Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ public WLSDeployLoggingConfig() {
System.exit(ERROR_EXIT_CODE);
}
PlatformLogger logger = WLSDeployLogFactory.getLogger(WLSDEPLOY_LOGGER_NAME); // make sure that this is the first logger
// this doesn't appear to do anything. do we need it?
logger.info("The {0} program will write its log to {1}", programName, logFileName);
}

Expand All @@ -168,6 +169,11 @@ public static synchronized File getLoggingDirectory() {
return new File(loggingDirectory.getAbsolutePath());
}

public static void logLoggingDirectory(String programName) {
PlatformLogger logger = WLSDeployLogFactory.getLogger(WLSDEPLOY_LOGGER_NAME);
logger.info("WLSDPLY-01755", programName, loggingDirectory.getAbsolutePath());
}

/**
* Get the logging.properties file.
*
Expand Down
2 changes: 2 additions & 0 deletions core/src/main/python/create.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from java.lang import System
from oracle.weblogic.deploy.create import CreateException
from oracle.weblogic.deploy.deploy import DeployException
from oracle.weblogic.deploy.logging import WLSDeployLoggingConfig
from oracle.weblogic.deploy.util import CLAException
from oracle.weblogic.deploy.util import FileUtils
from oracle.weblogic.deploy.util import WLSDeployArchiveIOException
Expand Down Expand Up @@ -379,6 +380,7 @@ def main(args):

if __name__ == '__main__' or __name__ == 'main':
WebLogicDeployToolingVersion.logVersionInfo(_program_name)
WLSDeployLoggingConfig.logLoggingDirectory(_program_name)
try:
main(sys.argv)
except exceptions.SystemExit, ex:
Expand Down
2 changes: 2 additions & 0 deletions core/src/main/python/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

from oracle.weblogic.deploy.deploy import DeployException
from oracle.weblogic.deploy.exception import BundleAwareException
from oracle.weblogic.deploy.logging import WLSDeployLoggingConfig
from oracle.weblogic.deploy.util import CLAException
from oracle.weblogic.deploy.util import WebLogicDeployToolingVersion

Expand Down Expand Up @@ -261,6 +262,7 @@ def main(args):

if __name__ == '__main__' or __name__ == 'main':
WebLogicDeployToolingVersion.logVersionInfo(_program_name)
WLSDeployLoggingConfig.logLoggingDirectory(_program_name)
try:
main(sys.argv)
except exceptions.SystemExit, ex:
Expand Down
2 changes: 2 additions & 0 deletions core/src/main/python/discover.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from oracle.weblogic.deploy.aliases import AliasException
from oracle.weblogic.deploy.discover import DiscoverException
from oracle.weblogic.deploy.json import JsonException
from oracle.weblogic.deploy.logging import WLSDeployLoggingConfig
from oracle.weblogic.deploy.util import CLAException
from oracle.weblogic.deploy.util import FileUtils
from oracle.weblogic.deploy.util import PyOrderedDict
Expand Down Expand Up @@ -641,6 +642,7 @@ def main(args):

if __name__ == '__main__' or __name__ == 'main':
WebLogicDeployToolingVersion.logVersionInfo(_program_name)
WLSDeployLoggingConfig.logLoggingDirectory(_program_name)
try:
main(sys.argv)
except exceptions.SystemExit, ex:
Expand Down
2 changes: 2 additions & 0 deletions core/src/main/python/encrypt.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from java.lang import String, System

from oracle.weblogic.deploy.encrypt import EncryptionException
from oracle.weblogic.deploy.logging import WLSDeployLoggingConfig
from oracle.weblogic.deploy.util import CLAException
from oracle.weblogic.deploy.util import TranslateException
from oracle.weblogic.deploy.util import VariableException
Expand Down Expand Up @@ -255,6 +256,7 @@ def main(args):

if __name__ == '__main__' or __name__ == 'main':
WebLogicDeployToolingVersion.logVersionInfo(_program_name)
WLSDeployLoggingConfig.logLoggingDirectory(_program_name)
try:
main(sys.argv)
except exceptions.SystemExit, ex:
Expand Down
2 changes: 2 additions & 0 deletions core/src/main/python/extract_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import sys

from oracle.weblogic.deploy.deploy import DeployException
from oracle.weblogic.deploy.logging import WLSDeployLoggingConfig
from oracle.weblogic.deploy.util import CLAException
from oracle.weblogic.deploy.util import WebLogicDeployToolingVersion

Expand Down Expand Up @@ -160,6 +161,7 @@ def main(args):

if __name__ == '__main__' or __name__ == 'main':
WebLogicDeployToolingVersion.logVersionInfo(_program_name)
WLSDeployLoggingConfig.logLoggingDirectory(_program_name)
try:
main(sys.argv)
except exceptions.SystemExit, ex:
Expand Down
2 changes: 2 additions & 0 deletions core/src/main/python/model_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import os
import sys

from oracle.weblogic.deploy.logging import WLSDeployLoggingConfig
from oracle.weblogic.deploy.util import CLAException
from oracle.weblogic.deploy.util import WebLogicDeployToolingVersion

Expand Down Expand Up @@ -451,6 +452,7 @@ def main(args):

if __name__ == '__main__' or __name__ == 'main':
WebLogicDeployToolingVersion.logVersionInfo(_program_name)
WLSDeployLoggingConfig.logLoggingDirectory(_program_name)
try:
main(sys.argv)
except exceptions.SystemExit, ex:
Expand Down
4 changes: 3 additions & 1 deletion core/src/main/python/prepare_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import sys
import traceback

from oracle.weblogic.deploy.logging import WLSDeployLoggingConfig
from oracle.weblogic.deploy.util import CLAException
from oracle.weblogic.deploy.util import PyWLSTException
from oracle.weblogic.deploy.util import WebLogicDeployToolingVersion
Expand Down Expand Up @@ -84,7 +85,7 @@ def main():
_outputdir = model_context.get_output_dir()
model_files = model_context.get_model_file()

obj = ModelPreparer(model_files, model_context, _outputdir)
obj = ModelPre https://github.com/jwgish/weblogic-deploy-tooling/pull/new/WDT-644parer(model_files, model_context, _outputdir)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know how the heck this got in here, and I can't figure out how to get rid of it.

obj.prepare_models()
tool_exit.end(model_context, ExitCode.OK)

Expand All @@ -111,6 +112,7 @@ def main():

if __name__ == "__main__" or __name__ == 'main':
WebLogicDeployToolingVersion.logVersionInfo(_program_name)
WLSDeployLoggingConfig.logLoggingDirectory(_program_name)
try:
main()
except exceptions.SystemExit, ex:
Expand Down
2 changes: 2 additions & 0 deletions core/src/main/python/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import sys

from oracle.weblogic.deploy.deploy import DeployException
from oracle.weblogic.deploy.logging import WLSDeployLoggingConfig
from oracle.weblogic.deploy.exception import BundleAwareException
from oracle.weblogic.deploy.util import CLAException
from oracle.weblogic.deploy.util import WebLogicDeployToolingVersion
Expand Down Expand Up @@ -311,6 +312,7 @@ def main(args):

if __name__ == '__main__' or __name__ == 'main':
WebLogicDeployToolingVersion.logVersionInfo(_program_name)
WLSDeployLoggingConfig.logLoggingDirectory(_program_name)
try:
main(sys.argv)
except exceptions.SystemExit, ex:
Expand Down
2 changes: 2 additions & 0 deletions core/src/main/python/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from java.util.logging import Level

from oracle.weblogic.deploy.logging import WLSDeployLogEndHandler
from oracle.weblogic.deploy.logging import WLSDeployLoggingConfig
from oracle.weblogic.deploy.util import CLAException
from oracle.weblogic.deploy.util import TranslateException
from oracle.weblogic.deploy.util import VariableException
Expand Down Expand Up @@ -200,6 +201,7 @@ def main(args):

if __name__ == '__main__' or __name__ == 'main':
WebLogicDeployToolingVersion.logVersionInfo(_program_name)
WLSDeployLoggingConfig.logLoggingDirectory(_program_name)
try:
main(sys.argv)
except exceptions.SystemExit, ex:
Expand Down
2 changes: 2 additions & 0 deletions core/src/main/python/variable_inject.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

from java.io import File
from java.lang import IllegalArgumentException
from oracle.weblogic.deploy.logging import WLSDeployLoggingConfig
from oracle.weblogic.deploy.util import CLAException
from oracle.weblogic.deploy.util import FileUtils
from oracle.weblogic.deploy.util import TranslateException
Expand Down Expand Up @@ -206,6 +207,7 @@ def main(args):

if __name__ == '__main__' or __name__ == 'main':
WebLogicDeployToolingVersion.logVersionInfo(_program_name)
WLSDeployLoggingConfig.logLoggingDirectory(_program_name)
try:
main(sys.argv)
except exceptions.SystemExit, ex:
Expand Down
7 changes: 4 additions & 3 deletions core/src/main/python/wlsdeploy/exception/exception_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import oracle.weblogic.deploy.yaml.YamlException as JYamlException

from wlsdeploy.exception.expection_types import ExceptionType
from wlsdeploy.util.cla_utils import CommandLineArgUtil
from wlsdeploy.util.exit_code import ExitCode
from wlsdeploy.util import tool_exit

Expand Down Expand Up @@ -195,7 +196,7 @@ def create_validate_exception(key, *args, **kwargs):
"""
arg_list, error = _return_exception_params(*args, **kwargs)
arg_len = len(arg_list)
if error is not None:
if error https://github.com/jwgish/weblogic-deploy-tooling/pull/new/WDT-644is not None:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo?

if arg_len > 0:
ex = ValidateException(key, error, arg_list)
else:
Expand Down Expand Up @@ -295,7 +296,7 @@ def create_yaml_exception(key, *args, **kwargs):
elif len(arg_list) > 0:
ex = JYamlException(key, arg_list)
else:
ex = JYamlException(key)
ex = https://github.com/jwgish/weblogic-deploy-tooling/pull/new/WDT-644JYamlException(key)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo?

return ex


Expand Down Expand Up @@ -495,4 +496,4 @@ def __handle_unexpected_exception(ex, program_name, class_name, logger):
# Note: since this is Python 2, it seems we can only get the traceback object via sys.exc_info, and of course only
# while in the except block handling code
logger.finer('WLSDPLY-20036', program_name, traceback.format_exception(type(ex), ex, sys.exc_info()[2]))
__log_and_exit(logger, ExitCode.ERROR, class_name)
__log_and_exit(logger, CommandLineArgUtil.PROG_ERROR_EXIT_CODE, class_name)
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,9 @@ WLSDPLY-01746=Invalid token syntax for {0} value "{1}", should match "{2}"
# oracle.weblogic.deploy.util.WebLogicDeployToolingVersion.java (in src/main/resources/templates)
WLSDPLY-01750=The WebLogic Deploy Tooling {0} version is {1}

# oracle.weblogic.deploy.logging.WLSDeployLoggingConfig.java
WLSDPLY-01755=The {0} program will write its log to directory {1}

# logger_test.py
WLSDPLY-01760=Failed to access key in map: {0}

Expand Down