Setting log file permissions causes problems on Windows systems. This feature is disabled until further testing is performed.
| | |
| | | writer = new BufferedWriter(osw, bufferSize); |
| | | } |
| | | |
| | | |
| | | // Try to apply file permissions. Causing problems with installer. Fix |
| | | // after 0.8. |
| | | /* |
| | | if(FilePermission.canSetPermissions()) |
| | | { |
| | | FilePermission.setPermissions(file, filePermissions); |
| | | try |
| | | { |
| | | if(!FilePermission.setPermissions(file, filePermissions)) |
| | | { |
| | | throw new Exception(); |
| | | } |
| | | } |
| | | catch(Exception e) |
| | | { |
| | | // Log an warning that the permissions were not set. |
| | | int msgID = MSGID_LOGGER_SET_PERMISSION_FAILED; |
| | | String message = getMessage(msgID, file.toString()); |
| | | logError(ErrorLogCategory.CONFIGURATION, |
| | | ErrorLogSeverity.SEVERE_WARNING, |
| | | message, msgID); |
| | | } |
| | | }*/ |
| | | } |
| | | |
| | | |
| | | /** |
| | |
| | | |
| | | |
| | | /** |
| | | * The message ID for the message that will be used if an error occured |
| | | * while setting file permissions on a log file. This takes the name of the |
| | | * file as the argument. |
| | | */ |
| | | public static final int MSGID_LOGGER_SET_PERMISSION_FAILED = |
| | | CATEGORY_MASK_LOG | SEVERITY_MASK_MILD_WARNING | 8; |
| | | |
| | | |
| | | |
| | | /** |
| | | * Associates a set of generic messages with the message IDs defined in this |
| | | * class. |
| | | */ |
| | |
| | | registerMessage(MSGID_ERROR_LOGGER_INVALID_CATEGORY, |
| | | "Invalid error log category %s"); |
| | | registerMessage(MSGID_ERROR_LOGGER_INVALID_OVERRIDE_SEVERITY, |
| | | "invalid override of severity level %s"); |
| | | "Invalid override of severity level %s"); |
| | | registerMessage(MSGID_LOGGER_SET_PERMISSION_FAILED, |
| | | "Unable to set file permissions for the log file %s"); |
| | | |
| | | } |
| | | } |