| | |
| | | import org.opends.server.api.plugin.PluginType; |
| | | import org.opends.server.core.DirectoryServer; |
| | | import org.opends.server.core.LockFileManager; |
| | | import org.opends.server.loggers.DebugLogger; |
| | | import org.opends.server.loggers.ErrorLogPublisher; |
| | | import org.opends.server.loggers.ErrorLogger; |
| | | import org.opends.server.loggers.JDKLogging; |
| | | import org.opends.server.loggers.TextErrorLogPublisher; |
| | | import org.opends.server.loggers.TextWriter; |
| | | import org.opends.server.protocols.ldap.LDAPAttribute; |
| | | import org.opends.server.tasks.ExportTask; |
| | | import org.opends.server.tools.tasks.TaskTool; |
| | |
| | | new DirectoryServer.InitializationBuilder(configFile.getValue()) |
| | | .requireCryptoServices() |
| | | .requireUserPlugins(PluginType.LDIF_EXPORT) |
| | | .requireErrorAndDebugLogPublisher(out, err) |
| | | .initialize(); |
| | | } |
| | | catch (InitializationException ie) |
| | |
| | | printWrappedText(err, ERR_CANNOT_INITIALIZE_SERVER_COMPONENTS.get(getExceptionMessage(ie))); |
| | | return 1; |
| | | } |
| | | |
| | | try |
| | | { |
| | | ErrorLogPublisher errorLogPublisher = TextErrorLogPublisher.getToolStartupTextErrorPublisher( |
| | | new TextWriter.STREAM(out)); |
| | | ErrorLogger.getInstance().addLogPublisher(errorLogPublisher); |
| | | |
| | | DebugLogger.getInstance().addPublisherIfRequired(new TextWriter.STREAM(out)); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | err.println("Error installing the custom error logger: " + stackTraceToSingleLineString(e)); |
| | | return 1; |
| | | } |
| | | } |
| | | |
| | | // See if there were any user-defined sets of include/exclude attributes or |