\documentclass{article}
\usepackage{ulem}
\usepackage{graphicx}
\usepackage{hyperref}
\pagestyle{headings}
\begin{document}
\part{Horde\textbackslash\{\}Log}
\section{Description}
Horde's Logging component.

The Horde Logging library was loosely based on the Zend 1 logging component back in H4. Recent upgrades implement PSR-3 logging and are informed by native PSR-3 implementations as well as Zend\textbackslash\{\}Log's successor Laminas\textbackslash\{\}Log

Horde\textbackslash\{\}Log internally delegates different aspects of log handling to formatters, filters and handlers, but exposes a unified Logger facade.

Horde's Logger contains multiple building blocks:

\begin{itemize}
\item The Logger is the facade implementing the PSR-3 <a href="https://wiki.horde.org/LoggerInterface">LoggerInterface</a>. This is the only surface consuming code needs to worry about


\item <a href="https://wiki.horde.org/LogLevels">LogLevels</a> have a criticality (integer) and a name (string). Multiple log levels of the same criticality might exist. The logger will only deal with messages for known log levels. You can either deliver custom log levels or fall back to a sane default.


\item The <a href="https://wiki.horde.org/LoggerAware">LoggerAware</a> interface enables automatically configuring the logger into an application


\item Filters can control if a message is going to be processed. Filters can be applied globally or to individual handlers.


\item Handlers can deliver the message to filesystem or external resources like syslog, a logger software or similar. A Logger can have multiple handlers. Handler-level filters can deliver only certain messages to certain files or backends while others are delivered to some default facility.


\item Formatters can control how a message is supposed to look like. While you can stack multiple formatters, if might not make sense for all combinations. A formatter may combine message text with message context into an XML or JSON format or it may fill placeholders with data from context. It may also truncate messages, obfuscate passwords or add line breaks etc.


\item The <a href="https://wiki.horde.org/LogMessage">LogMessage</a> class is the common interchange format the Logger presents to Filters, Formatters and Handlers. It combines <a href="https://wiki.horde.org/LogLevel">LogLevel</a>, text and context.


\end{itemize}
\section{Usage}
\section{Bugs}
List any tickets on <a href="http://bugs.horde.org/">http://bugs.horde.org/</a> that cover this issue or are relevant to it.

\section{People}
Ralf Lang for the H6 upgrade

\section{Resources}
Include links to protocol descriptions, specifications, RFCs, external applications, presentations on <a href="http://horde.org/papers/">http://horde.org/papers/</a> or elsewhere that are relevant, articles, API docs from <a href="http://dev.horde.org/">http://dev.horde.org/</a> - anything that might be useful to someone working on this.

\section{UPGRADING}
\subsection{3.x (H6)}
\subsubsection{Type hinting}
\begin{itemize}
\item Users should Type hint against either Horde\textbackslash\{\}Log\textbackslash\{\}<a href="https://wiki.horde.org/LoggerInterface">LoggerInterface</a> or Psr\textbackslash\{\}Log\textbackslash\{\}<a href="https://wiki.horde.org/LoggerInterface">LoggerInterface</a>
\begin{itemize}
\item Use Psr if you only want to emit logs


\item Use Horde if you want to call into horde specific extensions<br />
While both technically work, more specific typing improves static analysis and IDE hints.


\end{itemize}

\end{itemize}
\subsubsection{Awareness}
\begin{itemize}
\item Use Psr/Log/<a href="https://wiki.horde.org/LoggerAwareInterface">LoggerAwareInterface</a> for classes consuming loggers via setter injection


\item If you use setter injection and depend on horde-specific functionality, rather use the Horde\textbackslash\{\}Log\textbackslash\{\}<a href="https://wiki.horde.org/LoggerAwareInterface">LoggerAwareInterface</a>. As both conflict and have different use cases, choose wisely.


\end{itemize}
\subsubsection{Constraint Filter}
\begin{itemize}
\item The constraint filter is likely to go into a separate package soon.


\end{itemize}

\noindent\rule{\textwidth}{1pt}
Back to the <a href="https://wiki.horde.org/Project">Project List</a>

\end{document}
