com.microstrategy.web.objects.admin.serverconfig.LogDestinations |
This interface represents the log destinations for an IServer. Note that any changes made to an editable log destination (like FileLogDestination
) can be
saved only using save()
. For a given IServer, this object refers to all its log destinations. Thus, if one/more LogDestination
s
have been edited, they can be saved in a batch, using save()
.
Out of the possible log destination types, only two are editable. They are LogDestinationTypeDiagnosticsLog
and
LogDestinationTypePerformanceLog
. These destinations are represented by FileLogDestination
. 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 types
LogDestinationTypeDebugOutput
and LogDestinationTypeSystemLog
, there are seperate access
methods (getDebugOutputDestination()
and getSystemLogDestination()
).
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
abstract LogDestination |
add(String name, int type)
Adds a new
LogDestination with the name and type passed. | ||||||||||
abstract void |
clear()
Clears the collection of editable log destinations.
| ||||||||||
abstract Enumeration |
elements()
Returns an enumeration of
LogDestination objects. | ||||||||||
abstract LogDestination |
get(int index)
Returns the log destination at the index passed.
| ||||||||||
abstract LogDestination |
getDebugOutputDestination()
Returns the non-editable LogDestination of type
LogDestinationTypeDebugOutput . | ||||||||||
abstract LogDestination |
getItemByName(String name)
Returns the log destination with the name passed.
| ||||||||||
abstract LogDestination |
getSystemLogDestination()
Returns the non-editable LogDestination of type
LogDestinationTypeSystemLog . | ||||||||||
abstract boolean |
isEmpty()
Conveys if the log destination collection is empty.
| ||||||||||
abstract LogDestination |
remove(int index)
Removes the log destination at the index passed.
| ||||||||||
abstract boolean |
remove(LogDestination dest)
Removes the log destination object passed.
| ||||||||||
abstract void |
save()
Commits all changes done to this collection.
| ||||||||||
abstract int |
size()
Returns the number of log destinations in this collection object.
|
Adds a new LogDestination
with the name and type passed. The new log destination is only added to this local collection and is saved to IServer
only after save()
is called. Note that only editable destination types can be added i.e. LogDestinationTypeDiagnosticsLog
and
LogDestinationTypePerformanceLog
.
name | the name of the new destination. |
---|---|
type | the type of destination. |
IllegalArgumentException | if a non-editable destination type is passed i.e. LogDestinationTypeDebugOutput
and LogDestinationTypeSystemLog
|
---|
Clears the collection of editable log destinations. The changes are not committed to IServer till save()
is invoked.
Returns an enumeration of LogDestination
objects. Note that the collection methods as this one only gives access to editable log destination types i.e.
LogDestinationTypeDiagnosticsLog
and LogDestinationTypePerformanceLog
. For non
editable log destination types, there are seperate access methods e.g. getDebugOutputDestination()
and getSystemLogDestination()
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.
LogDestinationTypeDiagnosticsLog
and LogDestinationTypePerformanceLog
. For non
editable log destination types, there are seperate access methods e.g. getDebugOutputDestination()
and getSystemLogDestination()
index | index of the destination queried. |
---|
Returns the non-editable LogDestination of type LogDestinationTypeDebugOutput
.
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.
LogDestinationTypeDiagnosticsLog
and LogDestinationTypePerformanceLog
. For non
editable log destination types, there are seperate access methods e.g. getDebugOutputDestination()
and getSystemLogDestination()
name | the name of the destination queried. |
---|
Returns the non-editable LogDestination of type LogDestinationTypeSystemLog
.
Conveys if the log destination collection is empty. Note that the collection methods as this one only consider editable log destination types i.e.
LogDestinationTypeDiagnosticsLog
and LogDestinationTypePerformanceLog
.
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 after save()
is called. Note that the collection methods as this one only gives access to editable log destination types i.e.
LogDestinationTypeDiagnosticsLog
and LogDestinationTypePerformanceLog
. For non
editable log destination types, there are seperate access methods e.g. getDebugOutputDestination()
and getSystemLogDestination()
index | the index of the editable destination to remove. |
---|
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.
LogDestinationTypeDiagnosticsLog
and LogDestinationTypePerformanceLog
.
dest | the destination to remove. |
---|
Commits all changes done to this collection. This includes adding/removing/clearing (editable) log destinations or changing their properties.
ServerConfigException | If an error was encountered while saving the changes to IServer. |
---|
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.
LogDestinationTypeDiagnosticsLog
and LogDestinationTypePerformanceLog
.