Public Member Functions | |
RemoteLoggingService () | |
ComponentDescriptor | getComponentDescriptor () |
void | initialize (ComponentManager manager, Object state, ComponentDescriptor cdesc) throws IllegalComponentStateException, ComponentInitializationException |
String[][] | getConfigurationDescriptions () |
String | getConfigurationName () |
void | setConfiguration (AbeansProperties props) throws InitializationException |
void | run () |
void | log (int priority, String log) |
void | flush () |
void | destroy () |
void | setRemoteDirectory (RemoteDirectory directory) |
void | setCORBARemoteDirectory (NamingContext nc) |
Protected Attributes | |
CORBAService | corbaService = null |
Private Member Functions | |
void | connectLogger (boolean allowLogging) throws ComponentInitializationException |
void | reconnectLogger () |
int | extractIntProperty (AbeansProperties props, String name, int defaultValue) |
void | initializeCache () |
synchronized void | cacheCheck (boolean forceSend) |
synchronized void | cache (Any log) |
synchronized void | cache (Any[] logs) |
void | pushLog (Any log) |
void | invalidateLogger (boolean force) |
void | sendLogs (Any[] logs) |
Private Attributes | |
String | loggerContextName = DEFAULT_CENTRALIZED_LOGGER |
int | minCachePriority = DEFAULT_MIN_CACHE_PRIORITY |
int | maxCachePriority = DEFAULT_MAX_CACHE_PRIORITY |
int | cacheSize = DEFAULT_CACHE_SIZE |
int | maxCacheSize = DEFAULT_MAX_CACHE_SIZE |
int | maxThreads = DEFAULT_MAX_THREADS |
AbeansProperties | serviceConfig = null |
final transient ComponentDescriptor | descriptor |
ArrayList | cache = null |
boolean | cacheEnabled = false |
ThreadPoolService | threadPool = null |
ORB | orb = null |
boolean | destroyPhase = false |
int | pending = 0 |
int | threads = 0 |
boolean | disableRemoteDirectoryLookup = false |
RemoteDirectory | remoteDirectory = null |
NamingContext | corbaRemoteDirectory = null |
Log | logger = null |
Static Private Attributes | |
final String | RLS_RESOURCE_LOC = "RemoteLoggingService" |
final String | CENTRALIZED_LOGGER = "CentralizedLogger" |
final String | MIN_CACHE_PRIORITY = "MinCachePriority" |
final String | MAX_CACHE_PRIORITY = "MaxCachePriority" |
final String | CACHE_SIZE = "CacheSize" |
final String | MAX_CACHE_SIZE = "MaxCacheSize" |
final String | MAX_THREADS = "MaxThreads" |
final String | DEFAULT_CENTRALIZED_LOGGER = "Log" |
final String | DISABLE_REMOTE_DIRECTORY = "DisableRemoteDirectoryLookup" |
final int | DEFAULT_MIN_CACHE_PRIORITY = 0 |
final int | DEFAULT_MAX_CACHE_PRIORITY = 31 |
final int | DEFAULT_CACHE_SIZE = 10 |
final int | DEFAULT_MAX_CACHE_SIZE = 500 |
final int | DEFAULT_MAX_THREADS = 10 |
It depends on:
This implementation best effort is to minimize bad/broken connection impact to application execution performance (it should not block at all).
|
Constructor for RemoteLoggingService. |
|
Stores logs into cache. If cache is disabled, logs will be lost.
|
|
Stores log into cache. If cache is disabled, log will be lost.
|
|
Checks if cache has reached its full capacity and sends the logs if necessary.
|
|
Sync. method which connects to the CL
|
|
Overloads the destroy to first perform a clean flush. |
|
Extracts Method extractIntProperty.
|
|
Flushes all logs from cache.
|
|
|
|
Returns the descriptors for this service.
|
|
Returns name of the plug, the configuration name of this plug.
|
|
Initializes the component by placing it into the hierarchy.
|
|
Initialize cache buffer. |
|
Connect task |
|
Log entry method.
|
|
Sends log to the centralized logger. If it fails, the log will be put back into cache.
|
|
Silently tries to connect to the logger. |
|
Method run. |
|
This is the method which actually sends the logs to the centralized logger (should be called in separate thread). If it fails, logs will be put back into cache.
|
|
Interprets the configuration delivered by Abeans configuration service.
|
|
Set remote directory used to lookup for centralized logger reference.
|
|
Set remote directory used to lookup for centralized logger reference.
|
|
Cache. Note that |
|
The constant denoting the value of the configuration key. The number of log entries that can be kept in the local cache. When this number is reached, all log entries are transferred to the centralized logging. If network connection is not available, the local cache continues to grow, and every submitting of a log entry will attempt to flush the cache to the centralized logging. |
|
Caching policy. |
|
The constant denoting the value of the configuration key. The number of log entries that can be kept in the local cache. When this number is reached, all log entries are transferred to the centralized logging. If network connection is not available, the local cache continues to grow, and every submitting of a log entry will attempt to flush the cache to the centralized logging. |
|
The constant denoting the value of the configuration key. A stringified IOR of the centralized logging object. The IOR is expected to denote a persistent object which implements the Telecom Log Service�s Log interface, in particular the |
|
CORBA Remote Directory Service (used to lookup for cenralized logger reference). Additional RD, if |
|
CORBA service component; |
|
The constant denoting the default cache size. |
|
The constant denoting the default Centralized Logger reference. |
|
The constant denoting the default max. cache priority. |
|
The constant denoting the default max. cache size. |
|
The constant denoting the default max. number of threads. |
|
The constant denoting the default min. cache priority. |
|
Initial value: Component description of this plug. |
|
Destroy phase status. |
|
The constant denoting the value of the configuration key. Switch to disable remote directory lookup, reference should be provided manually via |
|
Switch to disable remote directory lookups. |
|
Centralized Logger remote object reference. |
|
Context name of the Centralized Logger. |
|
The constant denoting the value of the configuration key. Log entries whose priority exceeds (is greater than) the one specified with this property will be directly transmitted to the centralized logging, bypassing the local cache. If this is less than MinCachePriority, the local cache feature is disabled. |
|
The constant denoting the value of the configuration key. The maximum number of log entries (also used for internal purposes) that can be kept in the local cache. When this number is reached, all log entries are lost (implementation to save them to file can be added). |
|
The constant denoting the value of the configuration key. The maximum number of threads taken from thread pool by this service. NOTE: this value should be less than number of threads in the thread pool. |
|
The constant denoting the value of the configuration key. Log entries whose priority exceeds (is greater than) the one specified with this property will be directly transmitted to the centralized logging, bypassing the local cache. If this is less than MinCachePriority, the local cache feature is disabled. |
|
The maximum number of log entries (also used for internal purposes) that can be kept in the local cache. When this number is reached, all log entries are lost (implementation to save them to file can be added). |
|
The maximum number of threads taken from thread pool by this service. |
|
The constant denoting the value of the configuration key. Log entries whose priority is below (smaller than) the one specified with this property will be ignored (neither cached nor submitted to the centralized logging). In release version of the system, this will be set to LM_INFO (3), ignoring LM_TRACE and LM_DEBUG log entries. Debug version of the system will set this to LM_DEBUG (2). During development, it will be set to LM_TRACE (1). |
|
The constant denoting the value of the configuration key. Log entries whose priority is below (smaller than) the one specified with this property will be ignored (neither cached nor submitted to the centralized logging). In release version of the system, this will be set to LM_INFO (3), ignoring LM_TRACE and LM_DEBUG log entries. Debug version of the system will set this to LM_DEBUG (2). During development, it will be set to LM_TRACE (1). |
|
CORBA ORB. |
|
Number of pending log messages to be sent. |
|
Remote Directory Service (used to lookup for cenralized logger reference). |
|
The constant denoting the name of the configuration resource (file). |
|
Properties of the service. |
|
Thread Pool Service. |
|
Number of threads used. |