Index

Package: Alog.Tasked_Logger

Description

package Alog.Tasked_Logger is
Tasked Logger instance. Facilities can be attached to this logger instance in order to log to different targets simultaneously. This instance provides task-safe concurrent logging.

Tasks & Protected

Instance (task type)

References:

alog-tasked_logger.ads:39:14 (declaration)
alog-active_logger.ads:163:37 (reference)
alog-tasked_logger.adb:41:14 (body)
alog-tasked_logger.adb:103:44 (reference)
alog-tasked_logger.adb:126:44 (reference)
alog-tasked_logger.adb:258:8 (label)
alog-tasked_logger.ads:113:8 (label)
alog-tasked_logger.ads:120:30 (reference)
Tasked logger instance. The Init discriminant defines whether or not a default 'stdout' (FD facility without logfile set) is attached automatically. Default is 'False'. Set Init to 'True' if you want to make sure minimal stdout logging is possible as soon as a new logger is instantiated.

Types

Facility_Update_Handle

type Facility_Update_Handle is
   not null access procedure (Facility_Handle : Facilities.Handle);

References:

alog-tasked_logger.ads:35:9 (declaration)
alog-active_logger.adb:157:38 (reference)
alog-active_logger.adb:223:38 (reference)
alog-active_logger.ads:71:38 (reference)
alog-active_logger.ads:77:38 (reference)
alog-tasked_logger.adb:50:31 (reference)
alog-tasked_logger.adb:99:29 (reference)
alog-tasked_logger.adb:124:42 (reference)
alog-tasked_logger.ads:58:20 (reference)
alog-tasked_logger.ads:64:32 (reference)
Handle to facility update procedure.

Handle

type Handle is access all Instance;

References:

alog-tasked_logger.ads:120:9 (declaration)
Handle to tasked logger type.

Subprograms & Entries

Instance. Init

Init: Boolean := False)

References:

alog-tasked_logger.adb:44:61 (reference)

Instance. Attach_Facility (abstract)

entry Attach_Facility 
(Facility: Facilities.Handle);

References:

alog-active_logger.adb:53:22 (reference)
alog-tasked_logger.adb:62:23 (body)
alog-tasked_logger.adb:64:20 (label)
Attach a facility to tasked logger instance.

Instance. Attach_Default_Facility (abstract)

entry Attach_Default_Facility;

References:

alog-active_logger.adb:43:22 (reference)
alog-tasked_logger.adb:69:23 (body)
alog-tasked_logger.adb:71:20 (label)
Attach default facility to tasked logger instance.

Instance. Detach_Facility (abstract)

entry Detach_Facility 
(Name: String);

References:

alog-active_logger.adb:97:22 (reference)
alog-tasked_logger.adb:76:23 (body)
alog-tasked_logger.adb:78:20 (label)
Detach a facility from tasked logger instance.

Instance. Detach_Default_Facility (abstract)

entry Detach_Default_Facility;

References:

alog-active_logger.adb:87:22 (reference)
alog-tasked_logger.adb:83:23 (body)
alog-tasked_logger.adb:85:20 (label)
Detach default facility from tasked logger instance.

Instance. Facility_Count (abstract)

entry Facility_Count 
(Count: out Natural);

References:

alog-active_logger.adb:115:22 (reference)
alog-tasked_logger.adb:90:23 (body)
alog-tasked_logger.adb:92:20 (label)
Return number of attached facilites.

Instance. Update (abstract)

entry Update        
(Name: String;
Process: Facility_Update_Handle);

References:

alog-active_logger.adb:226:22 (reference)
alog-tasked_logger.adb:97:23 (body)
alog-tasked_logger.adb:103:53 (reference)
alog-tasked_logger.adb:104:20 (label)
Update a specific facility identified by 'Name'. Call the 'Process' procedure to perform the update operation. Clear the last exception occurrence for the caller if none occurred or replace existing occurrence with new raised exception.

Instance. Iterate (abstract)

entry Iterate 
(Process: Facility_Update_Handle);

References:

alog-active_logger.adb:160:22 (reference)
alog-tasked_logger.adb:124:23 (body)
alog-tasked_logger.adb:126:53 (reference)
alog-tasked_logger.adb:127:20 (label)
Call 'Process' for all attached facilities.

Instance. Attach_Transform (abstract)

entry Attach_Transform 
(Transform: Transforms.Handle);

References:

alog-active_logger.adb:63:22 (reference)
alog-tasked_logger.adb:146:23 (body)
alog-tasked_logger.adb:148:20 (label)
Attach a transform to tasked logger instance.

Instance. Detach_Transform (abstract)

entry Detach_Transform 
(Name: String);

References:

alog-active_logger.adb:107:22 (reference)
alog-tasked_logger.adb:153:23 (body)
alog-tasked_logger.adb:155:20 (label)
Detach a transform from tasked logger instance.

Instance. Transform_Count (abstract)

entry Transform_Count 
(Count: out Natural);

References:

alog-active_logger.adb:214:22 (reference)
alog-tasked_logger.adb:160:23 (body)
alog-tasked_logger.adb:162:20 (label)
Return number of attached transforms.

Instance. Log_Message (abstract)

entry Log_Message        
(Source: String := "";
Level: Log_Level;
Msg: String;
Caller: Ada.Task_Identification.Task_Id := Ada.Task_Identification.Null_Task_Id);

References:

alog-active_logger.adb:266:31 (reference)
alog-tasked_logger.adb:198:23 (body)
alog-tasked_logger.adb:213:40 (reference)
alog-tasked_logger.adb:217:20 (label)

Called by:

Alog.Active_Logger.Logging_Task defined at alog-active_logger.ads:149:14
Log a message. The Write_Message() procedure of all attached facilities is called. Depending on the Log-Threshold set, the message is logged to different targets (depending on the facilites) automatically. Clear the last exception occurrence for the caller if none occurred or replace existing occurrence with new raised exception. If caller is not specified the executing task's ID is used instead. Since Log_Message'Caller can not be used as default parameter the entry checks if the variable is set to 'Null_Task_Id' in the body. Prior to actually processing the given log message the policy database is inquired if the log message with given source and level should be logged.

Instance. Clear (abstract)

entry Clear;

References:

alog-active_logger.adb:79:22 (reference)
alog-tasked_logger.adb:168:23 (body)
alog-tasked_logger.adb:171:20 (label)
Clear tasked logger instance. Detach and teardown all attached facilities and transforms and clear any stored exceptions.

Instance. Get_Last_Exception (abstract)

entry Get_Last_Exception        
(Occurrence: out Ada.Exceptions.Exception_Occurrence;
Caller: Ada.Task_Identification.Task_Id := Ada.Task_Identification.Null_Task_Id);

References:

alog-active_logger.adb:71:22 (reference)
alog-active_logger.adb:133:22 (reference)
alog-tasked_logger.adb:176:23 (body)
alog-tasked_logger.adb:186:40 (reference)
alog-tasked_logger.adb:193:20 (label)
Return last known Exception_Occurrence. If no exception occured return Null_Occurrence. If caller is not specified the executing task's ID is used instead. Since Get_Last_Exception'Caller can not be used as default parameter the entry checks if the variable is set to 'Null_Task_Id' in the body.

Instance. Shutdown (abstract)

entry Shutdown;

References:

alog-active_logger.adb:206:22 (reference)
alog-tasked_logger.adb:241:23 (body)
Explicitly shutdown tasked logger.