Interface LogDestinations
-
public interface LogDestinationsThis interface represents the log destinations for an IServer. Note that any changes made to an editable log destination (likeFileLogDestination) can be saved only usingsave(). For a given IServer, this object refers to all its log destinations. Thus, if one/moreLogDestinations have been edited, they can be saved in a batch, usingsave(). Out of the possible log destination types, only two are editable. They areEnumLogDestinationType.LogDestinationTypeDiagnosticsLogandEnumLogDestinationType.LogDestinationTypePerformanceLog. These destinations are represented byFileLogDestination. The collection methods on this interface (add/remove/get/elements/isEmpty/getItemByName/size/clear) only work on editable log destinations. . For log destinations of remaining typesEnumLogDestinationType.LogDestinationTypeDebugOutputandEnumLogDestinationType.LogDestinationTypeSystemLog, there are seperate access methods (getDebugOutputDestination()andgetSystemLogDestination()).- Since:
- MicroStrategy Web 7.5.2
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description LogDestinationadd(java.lang.String name, int type)Adds a newLogDestinationwith the name and type passed.voidclear()Clears the collection of editable log destinations.java.util.Enumerationelements()Returns an enumeration ofLogDestinationobjects.LogDestinationget(int index)Returns the log destination at the index passed.LogDestinationgetDebugOutputDestination()Returns the non-editable LogDestination of typeEnumLogDestinationType.LogDestinationTypeDebugOutput.LogDestinationgetItemByName(java.lang.String name)Returns the log destination with the name passed.LogDestinationgetSystemLogDestination()Returns the non-editable LogDestination of typeEnumLogDestinationType.LogDestinationTypeSystemLog.booleanisEmpty()Conveys if the log destination collection is empty.LogDestinationremove(int index)Removes the log destination at the index passed.booleanremove(LogDestination dest)Removes the log destination object passed.voidsave()Commits all changes done to this collection.intsize()Returns the number of log destinations in this collection object.
-
-
-
Method Detail
-
add
LogDestination add(java.lang.String name, int type) throws java.lang.IllegalArgumentException
Adds a newLogDestinationwith the name and type passed. The new log destination is only added to this local collection and is saved to IServer only aftersave()is called. Note that only editable destination types can be added i.e.EnumLogDestinationType.LogDestinationTypeDiagnosticsLogandEnumLogDestinationType.LogDestinationTypePerformanceLog.- Parameters:
name- the name of the new destination.type- the type of destination.- Returns:
- LogDestination the newly created LogDestination.
- Throws:
java.lang.IllegalArgumentException- if a non-editable destination type is passed i.e.EnumLogDestinationType.LogDestinationTypeDebugOutputandEnumLogDestinationType.LogDestinationTypeSystemLog
-
get
LogDestination get(int index)
Returns the log destination at the index passed. Note that the collection methods as this one only gives access to editable log destination types i.e.EnumLogDestinationType.LogDestinationTypeDiagnosticsLogandEnumLogDestinationType.LogDestinationTypePerformanceLog. For non editable log destination types, there are seperate access methods e.g.getDebugOutputDestination()andgetSystemLogDestination()- Parameters:
index- index of the destination queried.- Returns:
- LogDestination the destination at the index passed.
-
remove
LogDestination remove(int index)
Removes the log destination at the index passed. If this is an existing log destination on IServer, the log destination is removed from IServer only aftersave()is called. Note that the collection methods as this one only gives access to editable log destination types i.e.EnumLogDestinationType.LogDestinationTypeDiagnosticsLogandEnumLogDestinationType.LogDestinationTypePerformanceLog. For non editable log destination types, there are seperate access methods e.g.getDebugOutputDestination()andgetSystemLogDestination()- Parameters:
index- the index of the editable destination to remove.- Returns:
- LogDestination the removed log destination.
-
elements
java.util.Enumeration elements()
Returns an enumeration ofLogDestinationobjects. Note that the collection methods as this one only gives access to editable log destination types i.e.EnumLogDestinationType.LogDestinationTypeDiagnosticsLogandEnumLogDestinationType.LogDestinationTypePerformanceLog. For non editable log destination types, there are seperate access methods e.g.getDebugOutputDestination()andgetSystemLogDestination()- Returns:
- Enumeration enumeration of editable destinations.
-
size
int size()
Returns the number of log destinations in this collection object. Note that the collection methods as this one only considers editable log destination types i.e.EnumLogDestinationType.LogDestinationTypeDiagnosticsLogandEnumLogDestinationType.LogDestinationTypePerformanceLog.- Returns:
- int the number of editable log destinations.
-
getItemByName
LogDestination getItemByName(java.lang.String name)
Returns the log destination with the name passed. Note that the collection methods as this one only gives access to editable log destination types i.e.EnumLogDestinationType.LogDestinationTypeDiagnosticsLogandEnumLogDestinationType.LogDestinationTypePerformanceLog. For non editable log destination types, there are seperate access methods e.g.getDebugOutputDestination()andgetSystemLogDestination()- Parameters:
name- the name of the destination queried.- Returns:
- LogDestination The destination with the name passed.
-
remove
boolean remove(LogDestination dest)
Removes the log destination object passed. The object passed is only removed from the local collection and will be removed from IServer only when @link #save is called}. Also, note that the collection methods as this one only allows editable log destination types i.e.EnumLogDestinationType.LogDestinationTypeDiagnosticsLogandEnumLogDestinationType.LogDestinationTypePerformanceLog.- Parameters:
dest- the destination to remove.- Returns:
- boolean True if the remove operation was successful.
-
isEmpty
boolean isEmpty()
Conveys if the log destination collection is empty. Note that the collection methods as this one only consider editable log destination types i.e.EnumLogDestinationType.LogDestinationTypeDiagnosticsLogandEnumLogDestinationType.LogDestinationTypePerformanceLog.- Returns:
- boolean True if there are no editable log destinations in this collection.
-
getDebugOutputDestination
LogDestination getDebugOutputDestination()
Returns the non-editable LogDestination of typeEnumLogDestinationType.LogDestinationTypeDebugOutput.- Returns:
- LogDestination returns the debug output log destination.
-
getSystemLogDestination
LogDestination getSystemLogDestination()
Returns the non-editable LogDestination of typeEnumLogDestinationType.LogDestinationTypeSystemLog.- Returns:
- LogDestination returns the system log destination.
-
clear
void clear()
Clears the collection of editable log destinations. The changes are not committed to IServer tillsave()is invoked.
-
save
void save() throws ServerConfigException
Commits all changes done to this collection. This includes adding/removing/clearing (editable) log destinations or changing their properties.- Throws:
ServerConfigException- If an error was encountered while saving the changes to IServer.
-
-