% $Id$

% Earth System Modeling Framework
% Copyright (c) 2002-2023, University Corporation for Atmospheric Research, 
% Massachusetts Institute of Technology, Geophysical Fluid Dynamics 
% Laboratory, University of Michigan, National Centers for Environmental 
% Prediction, Los Alamos National Laboratory, Argonne National Laboratory, 
% NASA Goddard Space Flight Center.
% Licensed under the University of Illinois-NCSA License.

%\subsection{Design/Implementation}

ACTIONS

1. A default log will be initialized when {\tt ESMF} starts.

2. The user sets the parameters of the Log file via {\tt ESMF\_LogSet}.

3. The user gets the parameters of the Log file via {\tt ESMF\_LogGet}.

4. The user writes to a buffer or writes directly to the Log file via 
   {\tt ESMF\_LogWrite} depending on the settings.

5. The user can flush the array via ESMF_LogFlush.

6. PET numbers will be automatically added to the log entries.

7. The user can specify {\tt ESMF\_LOGKIND\_SINGLE} which writes all entries from
all PET numbers to a single file or {\tt ESMF\_LOGKIND\_MULTI} which writes 
entries to multiple files according to its PET number.

8. The Log closes automatically when ESMF shuts down.


ASSUMPTIONS

1. Prior to closing, {\tt ESMF\_LogFlush} is always executed.

2. Prior to halting, {\tt ESMF\_LogFlush} is always executed and the {\tt Log}
   will show that a halt occurred.

3. If the number of elements in an {\tt ESMF\_Log} exceeds {\tt maxElements, 
   then the buffer flushes automatically and resets.



