You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
uDig has a lot of sys.out calls, which should be replaced by a logger. This improves the code-quality a lot including error handling within the RCP client.
Example:
CreateAndSelectNewFeature.java
if (fid != null) {
System.out.println("Create and select feature:" + fid); //$NON-NLS-1$
} else {
System.out.println(
"Create and select feature did not produce a feature id to select"); //$NON-NLS-1$
}
The text was updated successfully, but these errors were encountered:
Totally agree, at the time of writing we have 503 places with System.out in java-files and 45 occurences in other resources (such as rst sphinx files).
IMHO it makes sense to think about a common approach to provide logging-functionality within uDig. In almost each bundle Activator we find methods such as
public static void log( String message2, Throwable e );
public static void log( IStatus status );
public static void trace( String traceID, Class< ? > caller, String message, Throwable e );
public static void trace( Class< ? > caller, String message, Throwable e );
I guess these duplicated code blocks just differs in used Plugin-Id in implementation.
What Do you think about creating a LoggingHelper Class in org.locationtech.udig.core with method-signatures to provide the bundle to create log messages for.
public static void log( Bundle bundle, String message, Throwable e );
However, this refactoring should be independently from clean-up sysouts ;) I'll create an issue to cleanup-duplicated log/trace implementations ;)
uDig has a lot of sys.out calls, which should be replaced by a logger. This improves the code-quality a lot including error handling within the RCP client.
Example:
CreateAndSelectNewFeature.java
The text was updated successfully, but these errors were encountered: