javascript

Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
JAL-3746 apply copyright to source

  1. … 42 more files in changeset.
JAL-3438 spotless for 2.11.2.0

  1. … 658 more files in changeset.
JAL-3438 - all src and test run through spotless..

  1. … 665 more files in changeset.
That looks good. I was almost going to do something similar (I was thinking jalview.log.Log, but jalview.bin.Console is just as good) so happy with this!

That looks good. I was almost going to do something similar (I was thinking jalview.log.Log, but jalview.bin.Console is just as good) so happy with this!

Added those in. I'm still converting to String with getCanonicalName in the getLogger(Class ...) method because, e.g. JLogger jlogger1 = JLogger.getLogger(Jalview.class); JLogger jlogger2 = JLogger...

Added those in. I'm still converting to String with getCanonicalName in the getLogger(Class ...) method because, e.g.
JLogger jlogger1 = JLogger.getLogger(Jalview.class);
JLogger jlogger2 = JLogger.getLogger("jalview.bin.Jalview");
should really return an existing logger in the registry if it exists, and the String name is the registry key.

I was thinking that JLogger did this comparison anyway, but I've followed it through and it didn't. So I've added if (loglevel.compareTo(this.level) < 0) { return false; } to JLogger.println so t...

I was thinking that JLogger did this comparison anyway, but I've followed it through and it didn't. So I've added

if (loglevel.compareTo(this.level) < 0) { return false; }

to JLogger.println so that a comparison is made between the (enums) of JLogger.level and the message LogLevel, and if it's not going to be logged then it doesn't call the actual logger at all (in this case Log4j, so the log4j object is never even touched [even with logger.isDebugEnabled() because the answer should be no]).
This now applies to all log calls.
The check whether Cache.log != null is equivalent to Cache.log.loggerExists() which already happens within JLoggerLog4j.
There is admittedly the wrapper of the JLogger getting brought to forefront of memory, but that's presumably smaller than the old Cache.log which was a Log4j.Logger object.

AWESOME JOB !!!! one tiny niggle I had was that Cache.debug/Cache.error doesn't read nicely, so I've abstracted the logging stuff even farther to a new jalview.bin.Console class: see https://source...

AWESOME JOB !!!! one tiny niggle I had was that Cache.debug/Cache.error doesn't read nicely, so I've abstracted the logging stuff even farther to a new jalview.bin.Console class: see https://source.jalview.org/crucible/changelog/~br=update%402fJAL-3949_jalview_bin_Console_to_cure_sanity_even_more/jalview/

the reason for conditionals is that Java won't perform the string append operation if logLevel>debug. It saves a minor amount of processing time which is important for code that is executed lots.

the reason for conditionals is that Java won't perform the string append operation if logLevel>debug. It saves a minor amount of processing time which is important for code that is executed lots.

You could have .getLogger(Class ..) rather than having to call getCanonicalName ?

You could have .getLogger(Class ..) rather than having to call getCanonicalName ?

JAL-3949 An attempt at converting to Log4j 2 -- no output achieved!
JAL-3949 An attempt at converting to Log4j 2 -- no output achieved!
JAL-3949 Complete new abstracted logging framework in jalview.log. Updated log calls for this. Removal of jalview.javascript.log4j. Improvements to the Java Console (controllable autoscrolling).

  1. … 109 more files in changeset.
New jalview.log.JLogger logging framework. Remove jalview.javascript.log4j as no longer needed

    • -41
    • +0
    ./log4j/core/appender/ConsoleAppender.java
  1. … 12 more files in changeset.
streamlined Log4j usage

    • -0
    • +9
    ./log4j/core/Appender.java
    • -0
    • +194
    ./log4j/core/Logger.java
    • -0
    • +41
    ./log4j/core/appender/ConsoleAppender.java
    • -0
    • +204
    ./log4j/core/net/Priority.java
  1. … 4 more files in changeset.
I'm abandoning this review for now (see my comments on the issue). For what its worth since this is a string literal you should at least follow convention JALVIEW_LOGGER rather than a generic 'LOGG...

I'm abandoning this review for now (see my comments on the issue). For what its worth since this is a string literal you should at least follow convention JALVIEW_LOGGER rather than a generic 'LOGGER_NAME'. The code for routing logged content from other loggers should probably be a method on Cache... or even better, separate all this out into the jalview.util.Log4j class so Cache doesn't get polluted with log configuration cruft.

At the moment it is only used in jalview.bin.Cache, but it is used in separate places where appenders are added. Previous to this it was relying on the String name of the appender being correctly u...

At the moment it is only used in jalview.bin.Cache, but it is used in separate places where appenders are added. Previous to this it was relying on the String name of the appender being correctly used. However the Strings that were being used were not the same so it was broken (I don't know how that manifested itself, but it definitely would not have worked the way it used to!).
Feasibly a separate logger made in the future (e.g. API logger?) will want to add this Appender and will likely not be made in jalview.bin.Cache, so putting a constant String somewhere generically connected with Log4j seemed sensible. Correct it needs documenting!

Does this really need to be a string constant ? (I'm not convinced) needs documenting as the log4j internal name for the log if it really needs to be external.

Does this really need to be a string constant ? (I'm not convinced) needs documenting as the log4j internal name for the log if it really needs to be external.

JAL-3949 An attempt at converting to Log4j 2 -- no output achieved!
JAL-3949 An attempt at converting to Log4j 2 -- no output achieved!
JAL-3949 An attempt at converting to Log4j 2 -- no output achieved!

  1. … 11 more files in changeset.
JAL-3933 updated log4j and slf4j jars with log4j1.2 compatibility API jar. Removed log4j from jabaws-min-client and Jmol jars

  1. … 27 more files in changeset.
JAL-3691 automatic insertion of Locale.ROOT to toUpperCase() and toLowerCase() and added import java.util.Locale appropriately

  1. … 102 more files in changeset.
JAL-3810 - Add trace method to javascript implementation of Logger

Ah it does run when a column selection is made in a split frame (and propagated to the other panel). Which seems to work! Maybe just needs a less clumsy AlignmentViewport.isColSelChanged() - this m...

Ah it does run when a column selection is made in a split frame (and propagated to the other panel). Which seems to work!
Maybe just needs a less clumsy AlignmentViewport.isColSelChanged() - this method seems to be trying to do two different things.

Suggesting renaming to PROPERTY_COLUMNS = "columns" as this is used to notify changes to column selection or visibility, not sequences

Suggesting renaming to PROPERTY_COLUMNS = "columns" as this is used to notify changes to column selection or visibility, not sequences

I think this code path rarely gets run (AlignmentViewport.notifySequence() rarely gets called). So what is it there for?

I think this code path rarely gets run (AlignmentViewport.notifySequence() rarely gets called).
So what is it there for?

Suggest renaming notifyAlignment() to notifyAlignmentChanged(), and notifySequence() to notifyColumnChange() as it it fired for changes to column (not sequence) selection or visibility.

Suggest renaming notifyAlignment() to notifyAlignmentChanged(), and notifySequence() to notifyColumnChange() as it it fired for changes to column (not sequence) selection or visibility.

Unclear what notifySequence() adds. As placed here, it is hardly ever reached.

Unclear what notifySequence() adds. As placed here, it is hardly ever reached.

Not sure how to review this (and the appletgui/js classes) without pointers to documentation and/or examples of how it is used.

Not sure how to review this (and the appletgui/js classes) without pointers to documentation and/or examples of how it is used.