[Unicode]   Common Locale Data Repository : Bug Tracking Home | Site Map | Search
 
Modify

CLDR Ticket #8581(accepted tools)

Opened 22 months ago

Last modified 18 months ago

Move logging into utilities

Reported by: mark Owned by: mark
Component: survey Data Locale:
Phase: rc Review:
Weeks: Data Xpath:
Xref:

Description

I was thinking of having adding methods that could be called in lower-level functions but that could be replaced in the production ST for debugging problems that only show up there. Something like the following.

We do have SurveyLog , but that is in the Web stuff.

CLDRConfig

static abstract class Logger {

abstract public void log(Exception e, Object... parameters);

}


public static final Logger DEFAULT_LOGGER = new Logger() {

public void log(Exception e, Object... parameters) {

if (parameters.length > 0) {

System.err.println(Arrays.asList(parameters));

}
if (e != null) {

e.printStackTrace();

}

}

};


Logger logger = DEFAULT_LOGGER;

/

  • Log an exception, where the Survey tool can modify this to store more information,
  • such as when events happened, and so on.
  • It can also manage the storage, so that the logs don't overflow
  • (eg just retaining a few exceptions that happen at
  • the same place, or dropping old values.)
  • @param e - exception, may be null.
  • @param parameters - may be empty. Examples: the current locale, path, and value. */

public void log(Exception e, Object... parameters) {

logger.log(e, parameters);

}

Attachments

Change History

comment:1 Changed 22 months ago by emmons

  • Status changed from new to accepted
  • Cc srl added
  • Component changed from unknown to survey
  • Priority changed from assess to medium
  • Phase changed from dsub to rc
  • Milestone changed from UNSCH to 29
  • Owner changed from anybody to mark
  • Type changed from unknown to tools

comment:2 Changed 18 months ago by emmons

  • Milestone changed from 29 to upcoming
View

Add a comment

Modify Ticket

Action
as accepted
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.