mirror of
https://github.com/nasa/openmct.git
synced 2025-06-14 13:18:15 +00:00
[API] Fix logging of paths
When extensions have an explicitly-declared implementation, do not log that they are being loaded.
This commit is contained in:
@ -61,10 +61,9 @@ define(
|
||||
$log = this.$log;
|
||||
|
||||
function loadImplementation(extension) {
|
||||
var implPath = extension.getImplementationPath(),
|
||||
implPromise = extension.hasImplementationValue() ?
|
||||
var implPromise = extension.hasImplementationValue() ?
|
||||
Promise.resolve(extension.getImplementationValue()) :
|
||||
loader.load(implPath),
|
||||
loader.load(extension.getImplementationPath()),
|
||||
definition = extension.getDefinition();
|
||||
|
||||
// Wrap a constructor function (to avoid modifying the original)
|
||||
@ -119,13 +118,15 @@ define(
|
||||
return extension.getDefinition();
|
||||
}
|
||||
|
||||
// Log that loading has begun
|
||||
$log.info([
|
||||
"Loading implementation ",
|
||||
implPath,
|
||||
" for extension ",
|
||||
extension.getLogName()
|
||||
].join(""));
|
||||
if (!extension.hasImplementationValue()) {
|
||||
// Log that loading has begun
|
||||
$log.info([
|
||||
"Loading implementation ",
|
||||
extension.getImplementationPath(),
|
||||
" for extension ",
|
||||
extension.getLogName()
|
||||
].join(""));
|
||||
}
|
||||
|
||||
return implPromise.then(attachDefinition, handleError);
|
||||
}
|
||||
|
Reference in New Issue
Block a user