public static class SyncUsersTask.SyncLogWriter extends LogWriter
Overrides the base LogWriter
to provide logging to an
alternate log file for synchronization functions.
All message keys retrieved by this class are automatically prefixed with "MSG.SyncUsersTask." when the message id is retrieved.
NOTE: THIS CLASS CONTAINS JUST A PARTIAL OVERRIDE OF METHODS FOUND
IN LogWriter
. CARE SHOULD BE TAKEN TO ONLY INVOKE THE METHODS
THAT HAVE BEEN OVERRIDDEN.
Modifier and Type | Field and Description |
---|---|
private static org.apache.log4j.Logger |
cvSyncLog
A reference to the synchronization log file.
|
private static long |
serialVersionUID
The class' serialization version id.
|
Constructor and Description |
---|
SyncLogWriter() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getLogFileFolder()
Returns the configured file path for sync log files.
|
static java.lang.String |
getLogFileName()
Returns the configured file name for sync log files.
|
static org.apache.log4j.Level |
getLogLevel()
Returns the current log level for the sync log.
|
static void |
log(java.lang.String msgid)
Writes a sync log file entry for the given message id.
|
static void |
log(java.lang.String msgid,
java.lang.String... values)
Writes a sync log file entry for the given message id.
|
protected static void |
logMessage(org.apache.log4j.Level severity,
java.lang.String msgtext)
Writes a sync log file entry for the given severity level and message text
and sends an email if the message severity is configured for alert emails.
|
protected static java.lang.String |
qualifyMsgId(java.lang.String msgid)
Returns the given message id with "MSG.SyncUsersTask." prefixed to it.
|
static void |
setLogLevel(org.apache.log4j.Level severity)
Sets the current log level for the sync log.
|
dumpPropertiesToFile, dumpPropertiesToList, getAlertLevel, getStackTrace, log, log, log, log, logSeparator, parseMessage, parseMessage, sendAlertEmail, setAlertLevel, write, write
private static final long serialVersionUID
private static org.apache.log4j.Logger cvSyncLog
public static void log(java.lang.String msgid)
msgid
- (String) The id for the message to log. The msgid is
automatically prefixed with "MSG.SyncUsersTask.".public static void log(java.lang.String msgid, java.lang.String... values)
msgid
- (String) The id for the message to log. The msgid is
automatically prefixed with "MSG.SyncCustomersTask.".values
- (String) The value(s) to replace in the message text.
This parameter uses the varargs feature and can therefore be
passed as multiple parms (msgid, value1, value2, value3, valueN)
or as an array (msgid, values[]).protected static void logMessage(org.apache.log4j.Level severity, java.lang.String msgtext)
logMessage
in LogWriter.severity
- (Level) The severity of the message. Must be one of
the defined constants (DEBUG, INFO, WARN, ERROR or FATAL).msgtext
- (String) The text for the message to log and email.public static java.lang.String getLogFileFolder()
public static java.lang.String getLogFileName()
public static org.apache.log4j.Level getLogLevel()
public static void setLogLevel(org.apache.log4j.Level severity)
severity
- (Level) The current log level. Must be one of the
defined constants (DEBUG, INFO, WARN, ERROR or FATAL) or OFF.protected static java.lang.String qualifyMsgId(java.lang.String msgid)
msgid
- (String) The id for the message to qualify.