StorageFile logdir = logFactory.getLogDirectory();
try
{
String name = Monitor.getMonitor().getServiceName(this);
PersistentService ps =
Monitor.getMonitor().getServiceType(this);
String fullName = ps.getCanonicalServiceName(name);
Properties prop =
ps.getServiceProperties(fullName, (Properties)null);
StorageFile defaultLogDir =
storageFactory.newStorageFile(
LogFactory.LOG_DIRECTORY_NAME);
if (!logdir.equals(defaultLogDir))
{
prop.remove(Attribute.LOG_DEVICE);
if (SanityManager.DEBUG)
{
SanityManager.ASSERT(
prop.getProperty(Attribute.LOG_DEVICE) == null,
"cannot get rid of logDevice property");
}
logHistory(historyFile,
MessageService.getTextMessage(
MessageId.STORE_EDITED_SERVICEPROPS));
}
// save the service properties into the backup.
ps.saveServiceProperties(backupcopy.getPath(), prop, false);
}
catch(StandardException se)
{
logHistory(