BoilerPlate-LightweightLogging Service OMG Formal/03-11-03 |
#include <LogState.h>
Collaboration diagram for LogState:
The LogState is the point of reference and control for the Log. File functions, statistics, and state are kept here.
Public Member Functions | |
LogState (std::string log_name, unsigned long maxsize) throw (OrbInit::InitializationError) | |
Create a LogState with a log name. | |
LogState (std::string log_name, std::string log_dir, unsigned long maxsize) throw (OrbInit::InitializationError) | |
Create a LogState with log name and an output directory. | |
CosLwLog::LogFullAction | getFullAction () |
Access the LogFullAction state. | |
CosLwLog::AvailabilityStatus | getAvailStatus () |
Access the Availability status. | |
CosLwLog::OperationalState | getOpState () |
Access the Operational state. | |
CosLwLog::AdministrativeState | getAdminState () |
Access the Administrative state. | |
void | write_record (CosLwLog::LogRecord &recd) |
unsigned long | get_max_size () |
Access the maximum size in bytes the log can be before becoming full. | |
void | set_max_size (const unsigned long &max_size) |
void | setLogFullAction (const CosLwLog::LogFullAction &new_full_action) |
void | setAdminState (const CosLwLog::AdministrativeState &new_state) |
void | clearLog () |
void | destroyLog () |
unsigned long | get_current_size () |
Access the current size of the Log in bytes. | |
unsigned long | get_current_numb_records () |
Access the current number of records in the file. | |
const IdxRecordId::IdxRecord | find_log (const CosLwLog::LogTime &log_time) |
const IdxRecordId::IdxRecord | find_log (const CosLwLog::RecordId &recid) |
const std::string | get_log_file_name (const unsigned long &start_secs, const unsigned long &start_nanos) |
const bool | future_id (const CosLwLog::RecordId &recid) const |
CosLwLog::RecordId | future_id () |
CosLwLog::LogTime | init_logtime () |
bool | is_enabled () |
|
Create a LogState with a log name.
|
|
Create a LogState with log name and an output directory.
|
|
Purge the active log The active log will be copied to an archive. The Log continues to function per the current state. The active log begins recording Log Records immediately after the current records have been archived. The action is exactly as if the Log had reached its max size and Log Full Action is equal to WRAP. This operation is handy if the Log Full Action is HALT and the human administrator wants to restart the Log. |
|
Stop the current Log instance Shuts down the Log, closes all files and removes all references from the NameService. All files continue to exist. If the Log is restarted, it will begin its Log Record state from the point where it shut down. |
|
Find a Log Archive containing the specified RecordId Use a Record Id to find the Log Archive that contains the message associated with it
|
|
Find a Log Archive containing the specified LogTime Use a LogTime to find the Log Archive that contains records from that time
|
|
Obtain the future Record Id Obtain the next future record id
|
|
Test a record id to determine if it is in the future
|
|
Access the current number of records in the file.
|
|
Access the current size of the Log in bytes.
|
|
Manufacture a Log Archive name A Log's starting time is used in its archive name including nano seconds. Given the starting seconds and nano seconds from an IdxRecord, construct the archives full file name.
|
|
Access the maximum size in bytes the log can be before becoming full.
|
|
Access the Administrative state.
|
|
Access the Availability status.
|
|
Access the LogFullAction state.
|
|
Access the Operational state.
|
|
Set a new max size Set a new max size for the log. The current state will be immediately checked using the new max size
|
|
Change this log's administrative state The Adminstrative State determines if the Log can accept new log records. The new Administrative State takes immediate effect.
|
|
Change the log full action Adjust the log full action. The new action will take effect the next time the log reaches max_size
|
|
Write a record to the log
|
Copyright © BoilerPlate.org | Generated on Tue Nov 30 16:33:15 2004 for BoilerPlate CosLightweightLogging Service by 1.3.7 |