%
% API Documentation for nMOLDYN
% Module nMOLDYN.Core.Logger
%
% Generated by epydoc 3.0.1
% [Thu Oct  8 16:59:59 2009]
%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                          Module Description                           %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

    \index{nMOLDYN \textit{(package)}!nMOLDYN.Core \textit{(package)}!nMOLDYN.Core.Logger \textit{(module)}|(}
\section{Module nMOLDYN.Core.Logger}

    \label{nMOLDYN:Core:Logger}
\begin{alltt}
This module implements the classes used to handle the nMOLDYN logger.

Classes:
    * LogToGUI     : sets up a GUI logger.
    * LogToFile    : sets up a file logger.
    * LogToConsole : sets up a console logger.
    
Procedures:
    * LogMessage   : displays a logging message of a specified logging level to the specified logger(s).
\end{alltt}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                               Functions                               %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

  \subsection{Functions}

    \label{nMOLDYN:Core:Logger:LogMessage}
    \index{nMOLDYN \textit{(package)}!nMOLDYN.Core \textit{(package)}!nMOLDYN.Core.Logger \textit{(module)}!nMOLDYN.Core.Logger.LogMessage \textit{(function)}}

    \vspace{0.5ex}

\hspace{.8\funcindent}\begin{boxedminipage}{\funcwidth}

    \raggedright \textbf{LogMessage}(\textit{level}={\tt 'debug'}, \textit{message}={\tt ''}, \textit{media}={\tt ['gui','file','console']})

    \vspace{-1.5ex}

    \rule{\textwidth}{0.5\fboxrule}
\setlength{\parskip}{2ex}
    Displays the logging messahe {\textbar}message{\textbar} of logging 
    level {\textbar}level{\textbar} to the logger(s) 
    {\textbar}media{\textbar}.

\setlength{\parskip}{1ex}
      \textbf{Parameters}
      \vspace{-1ex}

      \begin{quote}
        \begin{Ventry}{xxxxxxx}

          \item[level]

          a string being one of 'debug', 'info', 'warning', 'error' or 
          'critical' specifying the logging level of the logging message. 
          Will change the way the logging message will be displayed.

            {\it (type=string)}

          \item[message]

          the logging message.

            {\it (type=string)}

          \item[media]

          a list containing 'gui' and/or 'file' and/or 'console' specifying
          on which logger(s) the logging message should emitted.

            {\it (type=list)}

        \end{Ventry}

      \end{quote}

    \end{boxedminipage}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                               Variables                               %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

  \subsection{Variables}

    \vspace{-1cm}
\hspace{\varindent}\begin{longtable}{|p{\varnamewidth}|p{\vardescrwidth}|l}
\cline{1-2}
\cline{1-2} \centering \textbf{Name} & \centering \textbf{Description}& \\
\cline{1-2}
\endhead\cline{1-2}\multicolumn{3}{r}{\small\textit{continued on next page}}\\\endfoot\cline{1-2}
\endlastfoot\raggedright L\-E\-V\-E\-L\-S\- & \raggedright \textbf{Value:} 
{\tt \{'debug': logging.DEBUG, 'info': logging.INFO, 'warning':\texttt{...}}&\\
\cline{1-2}
\raggedright F\-I\-L\-E\-\_\-L\-O\-G\-G\-E\-R\- & \raggedright \textbf{Value:} 
{\tt logging.getLogger('NMOLDYN LOGFILE')}&\\
\cline{1-2}
\raggedright C\-O\-N\-S\-O\-L\-E\-\_\-L\-O\-G\-G\-E\-R\- & \raggedright \textbf{Value:} 
{\tt logging.getLogger('NMOLDYN CONSOLE')}&\\
\cline{1-2}
\raggedright G\-U\-I\-\_\-L\-O\-G\-G\-E\-R\- & \raggedright \textbf{Value:} 
{\tt logging.getLogger('NMOLDYN GUI')}&\\
\cline{1-2}
\end{longtable}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                           Class Description                           %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

    \index{nMOLDYN \textit{(package)}!nMOLDYN.Core \textit{(package)}!nMOLDYN.Core.Logger \textit{(module)}!nMOLDYN.Core.Logger.LogToGUI \textit{(class)}|(}
\subsection{Class LogToGUI}

    \label{nMOLDYN:Core:Logger:LogToGUI}
\begin{tabular}{cccccccc}
% Line for logging.Filterer, linespec=[False, False]
\multicolumn{2}{r}{\settowidth{\BCL}{logging.Filterer}\multirow{2}{\BCL}{logging.Filterer}}
&&
&&
  \\\cline{3-3}
  &&\multicolumn{1}{c|}{}
&&
&&
  \\
% Line for logging.Handler, linespec=[False]
\multicolumn{4}{r}{\settowidth{\BCL}{logging.Handler}\multirow{2}{\BCL}{logging.Handler}}
&&
  \\\cline{5-5}
  &&&&\multicolumn{1}{c|}{}
&&
  \\
&&&&\multicolumn{2}{l}{\textbf{nMOLDYN.Core.Logger.LogToGUI}}
\end{tabular}

Sets up a GUI handler for the nMOLDYN logger.

Emits the logging messages to a Tk dialog.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                                Methods                                %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

  \subsubsection{Methods}

    \vspace{0.5ex}

\hspace{.8\funcindent}\begin{boxedminipage}{\funcwidth}

    \raggedright \textbf{\_\_init\_\_}(\textit{self})

    \vspace{-1.5ex}

    \rule{\textwidth}{0.5\fboxrule}
\setlength{\parskip}{2ex}
    The constructor. Sets the logger.

\setlength{\parskip}{1ex}
      Overrides: logging.Filterer.\_\_init\_\_

    \end{boxedminipage}

    \vspace{0.5ex}

\hspace{.8\funcindent}\begin{boxedminipage}{\funcwidth}

    \raggedright \textbf{emit}(\textit{self}, \textit{record})

    \vspace{-1.5ex}

    \rule{\textwidth}{0.5\fboxrule}
\setlength{\parskip}{2ex}
    Emits the logging message in a tkMessageBox.

\setlength{\parskip}{1ex}
      \textbf{Parameters}
      \vspace{-1ex}

      \begin{quote}
        \begin{Ventry}{xxxxxx}

          \item[record]

          the logging message.

            {\it (type=instance of LogRecord class.)}

        \end{Ventry}

      \end{quote}

      Overrides: logging.Handler.emit

\textbf{Note:} the tkMessageBox called will depend on the logging level.

\begin{itemize}
\setlength{\parskip}{0.6ex}
  \item tkMessageBox.showerror for 'ERROR' and 'CRITICAL' logging levels.

  \item tkMessageBox.showwarning for 'WARNING' logging level.

  \item tkMessageBox.showinfo for other logging levels.

\end{itemize}



    \end{boxedminipage}


\large{\textbf{\textit{Inherited from logging.Handler}}}

\begin{quote}
acquire(), close(), createLock(), flush(), format(), handle(), handleError(), release(), setFormatter(), setLevel()
\end{quote}

\large{\textbf{\textit{Inherited from logging.Filterer}}}

\begin{quote}
addFilter(), filter(), removeFilter()
\end{quote}
    \index{nMOLDYN \textit{(package)}!nMOLDYN.Core \textit{(package)}!nMOLDYN.Core.Logger \textit{(module)}!nMOLDYN.Core.Logger.LogToGUI \textit{(class)}|)}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                           Class Description                           %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

    \index{nMOLDYN \textit{(package)}!nMOLDYN.Core \textit{(package)}!nMOLDYN.Core.Logger \textit{(module)}!nMOLDYN.Core.Logger.LogToFile \textit{(class)}|(}
\subsection{Class LogToFile}

    \label{nMOLDYN:Core:Logger:LogToFile}
\begin{tabular}{cccccccccccc}
% Line for logging.Filterer, linespec=[False, False, False, False]
\multicolumn{2}{r}{\settowidth{\BCL}{logging.Filterer}\multirow{2}{\BCL}{logging.Filterer}}
&&
&&
&&
&&
  \\\cline{3-3}
  &&\multicolumn{1}{c|}{}
&&
&&
&&
&&
  \\
% Line for logging.Handler, linespec=[False, False, False]
\multicolumn{4}{r}{\settowidth{\BCL}{logging.Handler}\multirow{2}{\BCL}{logging.Handler}}
&&
&&
&&
  \\\cline{5-5}
  &&&&\multicolumn{1}{c|}{}
&&
&&
&&
  \\
% Line for logging.StreamHandler, linespec=[False, False]
\multicolumn{6}{r}{\settowidth{\BCL}{logging.StreamHandler}\multirow{2}{\BCL}{logging.StreamHandler}}
&&
&&
  \\\cline{7-7}
  &&&&&&\multicolumn{1}{c|}{}
&&
&&
  \\
% Line for logging.FileHandler, linespec=[False]
\multicolumn{8}{r}{\settowidth{\BCL}{logging.FileHandler}\multirow{2}{\BCL}{logging.FileHandler}}
&&
  \\\cline{9-9}
  &&&&&&&&\multicolumn{1}{c|}{}
&&
  \\
&&&&&&&&\multicolumn{2}{l}{\textbf{nMOLDYN.Core.Logger.LogToFile}}
\end{tabular}

Sets up a file logger.

Emits the logging messages to a file.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                                Methods                                %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

  \subsubsection{Methods}

    \vspace{0.5ex}

\hspace{.8\funcindent}\begin{boxedminipage}{\funcwidth}

    \raggedright \textbf{\_\_init\_\_}(\textit{self}, \textit{fileName})

    \vspace{-1.5ex}

    \rule{\textwidth}{0.5\fboxrule}
\setlength{\parskip}{2ex}
    The constructor. Sets the logger.

\setlength{\parskip}{1ex}
      \textbf{Parameters}
      \vspace{-1ex}

      \begin{quote}
        \begin{Ventry}{xxxxxxxx}

          \item[fileName]

          the name of the file where all the logging messages will be 
          emitted.

            {\it (type=string)}

        \end{Ventry}

      \end{quote}

      Overrides: logging.Filterer.\_\_init\_\_

    \end{boxedminipage}

    \vspace{0.5ex}

\hspace{.8\funcindent}\begin{boxedminipage}{\funcwidth}

    \raggedright \textbf{emit}(\textit{self}, \textit{record})

    \vspace{-1.5ex}

    \rule{\textwidth}{0.5\fboxrule}
\setlength{\parskip}{2ex}
    Emits the logging message in a file.

\setlength{\parskip}{1ex}
      \textbf{Parameters}
      \vspace{-1ex}

      \begin{quote}
        \begin{Ventry}{xxxxxx}

          \item[record]

          the logging message.

            {\it (type=instance of LogRecord class.)}

        \end{Ventry}

      \end{quote}

      Overrides: logging.Handler.emit

    \end{boxedminipage}

    \vspace{0.5ex}

\hspace{.8\funcindent}\begin{boxedminipage}{\funcwidth}

    \raggedright \textbf{close}(\textit{self})

    \vspace{-1.5ex}

    \rule{\textwidth}{0.5\fboxrule}
\setlength{\parskip}{2ex}
    Closes the file logger.

\setlength{\parskip}{1ex}
      Overrides: logging.Handler.close

    \end{boxedminipage}


\large{\textbf{\textit{Inherited from logging.StreamHandler}}}

\begin{quote}
flush()
\end{quote}

\large{\textbf{\textit{Inherited from logging.Handler}}}

\begin{quote}
acquire(), createLock(), format(), handle(), handleError(), release(), setFormatter(), setLevel()
\end{quote}

\large{\textbf{\textit{Inherited from logging.Filterer}}}

\begin{quote}
addFilter(), filter(), removeFilter()
\end{quote}
    \index{nMOLDYN \textit{(package)}!nMOLDYN.Core \textit{(package)}!nMOLDYN.Core.Logger \textit{(module)}!nMOLDYN.Core.Logger.LogToFile \textit{(class)}|)}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                           Class Description                           %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

    \index{nMOLDYN \textit{(package)}!nMOLDYN.Core \textit{(package)}!nMOLDYN.Core.Logger \textit{(module)}!nMOLDYN.Core.Logger.LogToConsole \textit{(class)}|(}
\subsection{Class LogToConsole}

    \label{nMOLDYN:Core:Logger:LogToConsole}
\begin{tabular}{cccccccccc}
% Line for logging.Filterer, linespec=[False, False, False]
\multicolumn{2}{r}{\settowidth{\BCL}{logging.Filterer}\multirow{2}{\BCL}{logging.Filterer}}
&&
&&
&&
  \\\cline{3-3}
  &&\multicolumn{1}{c|}{}
&&
&&
&&
  \\
% Line for logging.Handler, linespec=[False, False]
\multicolumn{4}{r}{\settowidth{\BCL}{logging.Handler}\multirow{2}{\BCL}{logging.Handler}}
&&
&&
  \\\cline{5-5}
  &&&&\multicolumn{1}{c|}{}
&&
&&
  \\
% Line for logging.StreamHandler, linespec=[False]
\multicolumn{6}{r}{\settowidth{\BCL}{logging.StreamHandler}\multirow{2}{\BCL}{logging.StreamHandler}}
&&
  \\\cline{7-7}
  &&&&&&\multicolumn{1}{c|}{}
&&
  \\
&&&&&&\multicolumn{2}{l}{\textbf{nMOLDYN.Core.Logger.LogToConsole}}
\end{tabular}

Sets up a console logger.

Emits the logging messages to the console.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%                                Methods                                %%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

  \subsubsection{Methods}

    \vspace{0.5ex}

\hspace{.8\funcindent}\begin{boxedminipage}{\funcwidth}

    \raggedright \textbf{\_\_init\_\_}(\textit{self})

    \vspace{-1.5ex}

    \rule{\textwidth}{0.5\fboxrule}
\setlength{\parskip}{2ex}
    The constructor. Sets the logger.

\setlength{\parskip}{1ex}
      Overrides: logging.Filterer.\_\_init\_\_

    \end{boxedminipage}

    \vspace{0.5ex}

\hspace{.8\funcindent}\begin{boxedminipage}{\funcwidth}

    \raggedright \textbf{emit}(\textit{self}, \textit{record})

    \vspace{-1.5ex}

    \rule{\textwidth}{0.5\fboxrule}
\setlength{\parskip}{2ex}
    Emits the logging message to the console.

\setlength{\parskip}{1ex}
      \textbf{Parameters}
      \vspace{-1ex}

      \begin{quote}
        \begin{Ventry}{xxxxxx}

          \item[record]

          the logging message.

            {\it (type=instance of LogRecord class.)}

        \end{Ventry}

      \end{quote}

      Overrides: logging.Handler.emit

    \end{boxedminipage}


\large{\textbf{\textit{Inherited from logging.StreamHandler}}}

\begin{quote}
flush()
\end{quote}

\large{\textbf{\textit{Inherited from logging.Handler}}}

\begin{quote}
acquire(), close(), createLock(), format(), handle(), handleError(), release(), setFormatter(), setLevel()
\end{quote}

\large{\textbf{\textit{Inherited from logging.Filterer}}}

\begin{quote}
addFilter(), filter(), removeFilter()
\end{quote}
    \index{nMOLDYN \textit{(package)}!nMOLDYN.Core \textit{(package)}!nMOLDYN.Core.Logger \textit{(module)}!nMOLDYN.Core.Logger.LogToConsole \textit{(class)}|)}
    \index{nMOLDYN \textit{(package)}!nMOLDYN.Core \textit{(package)}!nMOLDYN.Core.Logger \textit{(module)}|)}
