1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
|
\documentclass[a4paper]{article}
\usepackage{graphicx}
\usepackage[colorlinks]{hyperref}
\title{Log4Ada documentation}
\author{X. Grave}
\begin{document}
\maketitle
\tableofcontents
\section*{Introduction}
Log4Ada is a library written in the intend to ease logging in applications
written in Ada. For more information about the logging scheme developed in
this library see the log4j project~:
\href{http://logging.apache.org/log4j/docs/}{Log4J}
This documentation is in a very preliminary state.
\section{Logging Levels}
There is five level of logging~:
\begin{itemize}
\item Debug
\item Info
\item Warn
\item Error
\item Fatal
\end{itemize}
Associated to each level there is a procedure in the Log4ada.Loggers package~:
\begin{itemize}
\item Debug\_Out
\item Info\_out
\item Warn\_Out
\item Error\_Out
\item Fatal\_Out
\end{itemize}
All these procedures exists in two flavour, the first one with two parameters~:
\begin{itemize}
\item Logger which is a not null access Logger\_Type
\item Message which is a String containing the information you want to log
\end{itemize}
The second one add a third parameter which is an Exception\_Occurrence. Log4Ada
adds automatically the information extracted from the exception to the message.
\section{Appenders}
In order to have log out of the system, one needs to associate one or more
appender to a Logger. This is done using the Add\_Appender procedure from the
Log4ada.Loggers package. Log4Ada already provides a few appenders~:
\begin{itemize}
\item a console based one (Log4ada.Appenders.Consoles)
\item logging to a file (Log4ada.Appenders.Files)
\item logging to a log4j compatible tcp stream (Log4ada.Appenders.Tcp\_Stream)
\subitem one can connect to
\href{http://logging.apache.org/chainsaw/index.html}{chainsaw} for example.
\item xml output (Log4ada.Appenders.Xml)
\item Annex E logging facility to concentrate all logs from a distributed
application (Log4ada.Appenders.Annex\_E)
\end{itemize}
\end{document}
|