Classes | Functions | Variables
messagefacility/messagefacility/MessageLogger/doc/MessageLoggerDesign.txt File Reference

Classes

struct  KitchenSink
 
struct  MessageLoggerSpigot
 
struct  MessageLoggerScribe
 
class  MessageLoggerQ
 
struct  MessageSender
 

Functions

MessageLogger Design Glossary KitchenSink Initializes certain static lifetime entities which need to be around before any subtantive code in main () is done.Instantiated at the begining of main()
 
goes out of scope only when it makes it (tells it to) go away.Concpetually a destructible singleton
 
MessageLoggerQmessageLoggerQ ()
 
void messageLoggerScribe ()
 
MessageSender LogWarning (const char *id)
 
a pre services activity issues a LogError("id") f LogWarning is a free returning a MessageSender which it constructs The MessageSender class contains an ErrorObj which the ctor initializes to point to an ErrorObj on the constructed from ELwarning and myid This though allocated via will not be deleted explicitly by MessageSender an auto_ptr will be formed to pass that duty onward g The messageSender now has a couple of invocations of operator<< ().It passes a and b on to its internal ErrorObj in the obvious manner.h) At the end of the statement issuing the message
 
a pre services activity issues a LogError("id") f LogWarning is a free returning a MessageSender which it constructs The MessageSender class contains an ErrorObj which the ctor initializes to point to an ErrorObj on the constructed from ELwarning and myid This though allocated via will not be deleted explicitly by MessageSender an auto_ptr will be formed to pass that duty onward g The messageSender now has a couple of invocations of the MessageSender returned by LogWarning goes out of scope and is destructed i The dtor of MessageSender obtains a slot in the queue obtained by it is relieved of responsibility for deleting the ErrorObj j The last act of the MessageSender dtor is to call the commit() member function of the slot obtained.Now we resolve the hanging execution issue that we left at steps d and d *it has the class variable errlogp in scope *ep is sent (<<) to that error logger.Thus the message is formated and comes out in all the destinations--in this case just cerr--attached to the logger.n) At the end of the LOG case
 

Variables

a pre services activity issues a LogError("id") f LogWarning is a free function
 
a pre services activity issues a LogError("id") f LogWarning is a free returning a MessageSender which it constructs The MessageSender class contains an ErrorObj which the ctor initializes to point to an ErrorObj on the heap
 
a pre services activity issues a LogError("id") f LogWarning is a free returning a MessageSender which it constructs The MessageSender class contains an ErrorObj which the ctor initializes to point to an ErrorObj on the constructed from ELwarning and myid This ErrorObj
 
a pre services activity issues a LogError("id") f LogWarning is a free returning a MessageSender which it constructs The MessageSender class contains an ErrorObj which the ctor initializes to point to an ErrorObj on the constructed from ELwarning and myid This though allocated via new
 
a pre services activity issues a LogError("id") f LogWarning is a free returning a MessageSender which it constructs The MessageSender class contains an ErrorObj which the ctor initializes to point to an ErrorObj on the constructed from ELwarning and myid This though allocated via will not be deleted explicitly by MessageSender instead
 
a pre services activity issues a LogError("id") f LogWarning is a free returning a MessageSender which it constructs The MessageSender class contains an ErrorObj which the ctor initializes to point to an ErrorObj on the constructed from ELwarning and myid This though allocated via will not be deleted explicitly by MessageSender an auto_ptr will be formed to pass that duty onward g The messageSender now has a couple of invocations of the MessageSender returned by LogWarning goes out of scope and is destructed i The dtor of MessageSender obtains a slot in the queue obtained by it is relieved of responsibility for deleting the ErrorObj j The last act of the MessageSender dtor is to call the commit() member function of the slot obtained.Now we resolve the hanging execution issue that we left at steps d and d *it has the class variable errlogp in scope *ep is the auto_ptr goes out of scope
 
a pre services activity issues a LogError("id") f LogWarning is a free returning a MessageSender which it constructs The MessageSender class contains an ErrorObj which the ctor initializes to point to an ErrorObj on the constructed from ELwarning and myid This though allocated via will not be deleted explicitly by MessageSender an auto_ptr will be formed to pass that duty onward g The messageSender now has a couple of invocations of the MessageSender returned by LogWarning goes out of scope and is destructed i The dtor of MessageSender obtains a slot in the queue obtained by it is relieved of responsibility for deleting the ErrorObj j The last act of the MessageSender dtor is to call the commit() member function of the slot obtained.Now we resolve the hanging execution issue that we left at steps d and d *it has the class variable errlogp in scope *ep is the auto_ptr goes out of thus deleting the ErrorObj so that the memory on the heap is properly freed o At the end of the switch on command
 
a pre services activity issues a LogError("id") f LogWarning is a free returning a MessageSender which it constructs The MessageSender class contains an ErrorObj which the ctor initializes to point to an ErrorObj on the constructed from ELwarning and myid This though allocated via will not be deleted explicitly by MessageSender an auto_ptr will be formed to pass that duty onward g The messageSender now has a couple of invocations of the MessageSender returned by LogWarning goes out of scope and is destructed i The dtor of MessageSender obtains a slot in the queue obtained by it is relieved of responsibility for deleting the ErrorObj j The last act of the MessageSender dtor is to call the commit() member function of the slot obtained.Now we resolve the hanging execution issue that we left at steps d and d *it has the class variable errlogp in scope *ep is the auto_ptr goes out of thus deleting the ErrorObj so that the memory on the heap is properly freed o At the end of the switch on the buffer is replaced into the pool Since dontDie remains true
 

Function Documentation

goes out of scope only when it makes it ( tells it  to)

Definition at line 14 of file MessageLoggerDesign.txt.

15  : We rely on the fact that
16  the dtor is invoked at the end of the job, to
17  cleanly terminate the messageLoggerScribe thread.
18  Instantiated early in instantiation of a KitchenSink.
19  We do not use the DestructibleSingleton pattern
20  because we want to keep the code reuired in
21  KitchenSink as trivial as possible.
22 
23 MessageLoggerQ Interthread communication buffer of MessageLoggerSlot
24  blocks. Handles all the locking, blocking, sleeping,
25  waking, etc. Singleton. Makes use of framework's
26  Interthread communication buffer mechanism.
27 
28 MessageLoggerScribe Singleton, responsible for creating, owning, and
29  managing the (single) ErrorLog and for consuming
30  MessageLoggerSlot blocks from the MessageLoggerQ.
31 
32 MessageSender Primary interface between the user composing a
33  message (by invoking LogWarning or the like) and
34  the MessageLoggerQ, for which it acts as a producer.
35 
36 MessageLogger A framework service, which when started up (and
37  possibly at other times) passes parameter-set
38  or other information via the MessageLoggerQ
39  for purpose of configuring the behavior of the
40  ErrorLog owned by MessageLoggerScribe.
41 
42 ===========================================================================
43 int
44 main() {
45  KitchenSink ks;
46  .
47  .
48  .
49 }
void messageLoggerScribe()
it is part of the same thread as the issuing message Thus when it sets up that info is available for stuffing into the ErrorObj or use in deciding whether to react to a LogDebug The information provided is
The tests in this directory tree as of have been extracted from the CMS MessageFacility so have been left operating *Tests that were in the top level test directory previously have been relegated to test Integation As noted by the directory these are not unit tests They are built but not executed as they require configuration files to be converted to fhiclcpp *Tests in and under test MessageService are neither built nor executed as they have multiple dependencies on the wider framework
Definition: README_TESTS.txt:8
The private default constructor with no arguments first calls then sets stmt_ to the and then default initializes the registry_ data member it would be better to initialize primaryDB_ to and then calls or on error it does not
Making New Hardwired Defaults for the and how to create a specialized set of selectable by doing mute mode whateverNameYouChoose The MessageLogger has a set of hardwired for use when no MessageLogger configuration appears in the config file These match the contents of the MessageLogger cfi file Although these defaults are hardwired into code
const double a
thus any information present in the drop and needed by the server needs to be added into the ErrorObject that will cross the client server boundary MessageLogger h uses the MessageDrop in the LogDebug macro to learn the value of debugEnabled If debugEnabled is set to then the effect of LogDebug is to immediately return MessageSender cc gets the instance of MessageDrop to find out the moduleName and the runEvent It then places these into the ErrorObject it is forming to pass over to the server This is how the correct event for finds its way accurately into that other thread even if yet other threads are also issuing messages MessageLogger cc is responsible for filling the data fields of the MessageDrop with needed information MessageLogger cc is in the to avoid introducing a dependency on ModuleDescription into MessageLogger But it is not part of the MessageLoggerScribe thread
the code is simple for that
auto end(Data< Value > const &data)
This add method has three it adds this message xid and id to the appropriate and it updates the dynamic information in counts The sequence is as the static apppropriate and timespan will be in the mapped CountAndLimit and there will be no need to recompute them If this xid is not yet in see if the category is in limits if the appropriate counts struct can be formed by using the precedence rules above to combine the limit and interval found in limits along with the severityLimits and severityIntervals arrays found in the ELlimitsTable Along the way the limits map for this category is filled in
std::string pattern
Definition: regex_t.cc:33
Actions and Circumstances Relevant to Incomplete Log Problem The some of the LogInfo messages issued at the end involving branch information are failing to emerge This necessitates re running the job
dictionary all
Flash Comparison #.
MessageSender LogWarning ( const char *  id)

Definition at line 172 of file MessageLoggerDesign.txt.

173 {
174  return MessageSender (ELwarning, id);
175 }
ELslProxy< ELwarningGen > constexpr ELwarning
MessageLogger Design Glossary KitchenSink Initializes certain static lifetime entities which need to be around before any subtantive code in main ( )
MessageLoggerQ* messageLoggerQ ( )

Definition at line 63 of file MessageLoggerDesign.txt.

63  {
64  static MessageLoggerQ q(500,sizeof(MessageLoggerSlot));
65  return &q;
66 }
void messageLoggerScribe ( )

Definition at line 88 of file MessageLoggerDesign.txt.

88  {
90  m.activate();
91 }
static const double m
Definition: Units.h:79
a pre services activity issues a LogError ("id") f LogWarning is a free returning a MessageSender which it constructs The MessageSender class contains an ErrorObj which the ctor initializes to point to an ErrorObj on the constructed from ELwarning and myid This though allocated via will not be deleted explicitly by MessageSender an auto_ptr will be formed to pass that duty onward g The messageSender now has a couple of invocations of operator<< ( )
a pre services activity issues a LogError ("id") f LogWarning is a free returning a MessageSender which it constructs The MessageSender class contains an ErrorObj which the ctor initializes to point to an ErrorObj on the constructed from ELwarning and myid This though allocated via will not be deleted explicitly by MessageSender an auto_ptr will be formed to pass that duty onward g The messageSender now has a couple of invocations of the MessageSender returned by LogWarning goes out of scope and is destructed i The dtor of MessageSender obtains a slot in the queue obtained by it is relieved of responsibility for deleting the ErrorObj j The last act of the MessageSender dtor is to call the commit () member function of the slot obtained. Now we resolve the hanging execution issue that we left at steps d and d* it has the class variable errlogp in scope* ep is sent ( <<  )

Variable Documentation

a pre services activity issues a LogError ("id") f LogWarning is a free returning a MessageSender which it constructs The MessageSender class contains an ErrorObj which the ctor initializes to point to an ErrorObj on the constructed from ELwarning and myid This though allocated via will not be deleted explicitly by MessageSender an auto_ptr will be formed to pass that duty onward g The messageSender now has a couple of invocations of the MessageSender returned by LogWarning goes out of scope and is destructed i The dtor of MessageSender obtains a slot in the queue obtained by it is relieved of responsibility for deleting the ErrorObj j The last act of the MessageSender dtor is to call the commit () member function of the slot obtained. Now we resolve the hanging execution issue that we left at steps d and d* it has the class variable errlogp in scope* ep is the auto_ptr goes out of thus deleting the ErrorObj so that the memory on the heap is properly freed o At the end of the switch on command

Definition at line 246 of file MessageLoggerDesign.txt.

a pre services activity issues a LogError ("id") f LogWarning is a free returning a MessageSender which it constructs The MessageSender class contains an ErrorObj which the ctor initializes to point to an ErrorObj on the constructed from ELwarning and myid This ErrorObj

Definition at line 209 of file MessageLoggerDesign.txt.

a pre services activity issues a LogError ("id") f LogWarning is a free function

Definition at line 177 of file MessageLoggerDesign.txt.

a pre services activity issues a LogError ("id") f LogWarning is a free returning a MessageSender which it constructs The MessageSender class contains an ErrorObj which the ctor initializes to point to an ErrorObj on the heap

Definition at line 209 of file MessageLoggerDesign.txt.

a pre services activity issues a LogError ("id") f LogWarning is a free returning a MessageSender which it constructs The MessageSender class contains an ErrorObj which the ctor initializes to point to an ErrorObj on the constructed from ELwarning and myid This though allocated via will not be deleted explicitly by MessageSender instead

Definition at line 209 of file MessageLoggerDesign.txt.

a pre services activity issues a LogError ("id") f LogWarning is a free returning a MessageSender which it constructs The MessageSender class contains an ErrorObj which the ctor initializes to point to an ErrorObj on the constructed from ELwarning and myid This though allocated via new

Definition at line 209 of file MessageLoggerDesign.txt.

a pre services activity issues a LogError ("id") f LogWarning is a free returning a MessageSender which it constructs The MessageSender class contains an ErrorObj which the ctor initializes to point to an ErrorObj on the constructed from ELwarning and myid This though allocated via will not be deleted explicitly by MessageSender an auto_ptr will be formed to pass that duty onward g The messageSender now has a couple of invocations of the MessageSender returned by LogWarning goes out of scope and is destructed i The dtor of MessageSender obtains a slot in the queue obtained by it is relieved of responsibility for deleting the ErrorObj j The last act of the MessageSender dtor is to call the commit () member function of the slot obtained. Now we resolve the hanging execution issue that we left at steps d and d* it has the class variable errlogp in scope* ep is the auto_ptr goes out of scope

Definition at line 246 of file MessageLoggerDesign.txt.

a pre services activity issues a LogError ("id") f LogWarning is a free returning a MessageSender which it constructs The MessageSender class contains an ErrorObj which the ctor initializes to point to an ErrorObj on the constructed from ELwarning and myid This though allocated via will not be deleted explicitly by MessageSender an auto_ptr will be formed to pass that duty onward g The messageSender now has a couple of invocations of the MessageSender returned by LogWarning goes out of scope and is destructed i The dtor of MessageSender obtains a slot in the queue obtained by it is relieved of responsibility for deleting the ErrorObj j The last act of the MessageSender dtor is to call the commit () member function of the slot obtained. Now we resolve the hanging execution issue that we left at steps d and d* it has the class variable errlogp in scope* ep is the auto_ptr goes out of thus deleting the ErrorObj so that the memory on the heap is properly freed o At the end of the switch on the buffer is replaced into the pool Since dontDie remains true

Definition at line 246 of file MessageLoggerDesign.txt.