60 lines
3.5 KiB
TeX
60 lines
3.5 KiB
TeX
\section{Log Level Settings}
|
|
\label{logLevel}
|
|
|
|
The server uses loggers for server events. These logs are stored under \filename{\$PORTAL\_HOME/logs}; by default, \filename{\$PORTAL\_HOME} is \filename{\${user.home}/.portal}.
|
|
|
|
Each application component has a logger associated with it with the default log level of \command{INFO} which will show general information to highlight progress. Each log level has an assigned level of importants with \command{OFF} being the most important and \command{ALL} being the least important. When determining what the log, the event to be logged compares itself to the logger and what its level is set at. If the event being logged is less important than the current log level for the component, that event will be ignored. If it is greater than or equal to the current level, the event will be logged.
|
|
|
|
The level of importances from greatest to least is
|
|
|
|
\command{OFF > FATAL > ERROR > WARN > INFO > DEBUG > TRACE > ALL}. See Table~\ref{tab:logLevels} of explanation of each level
|
|
\begin{table}[!htb]
|
|
\centering
|
|
\caption{Log Level Description \label{tab:logLevels}}
|
|
\begin{tabular}{| r | p{7cm} |} \hline
|
|
Level & Description \\ \hline
|
|
ALL & All levels including custom levels. \\ \hline
|
|
TRACE & Designates finer-grained informational events than the DEBUG. \\ \hline
|
|
DEBUG & Designates fine-grained informational events that are most useful to debug an application. \\ \hline
|
|
INFO & Designates informational messages that highlight the progress of the application at coarse-grained level. \\ \hline
|
|
WARN & Designates potentially harmful situations. \\ \hline
|
|
ERROR & Designates error events that might still allow the application to continue running. \\ \hline
|
|
FATAL & Designates very severe error events that will presumably lead the application to abort. \\ \hline
|
|
OFF & The highest possible rank and is intended to turn off logging. \\ \hline
|
|
\end{tabular}
|
|
\end{table}
|
|
|
|
\subsection{Changing log levels}
|
|
The following case allows a user to change the log level for server components. Upon saving the log levels, the component will now respects its new level and log according.
|
|
|
|
NOTE: These values are persisted. Upon server restart, the server will see if there is an entry for the logger and set the log level accordingly; otherwise, it will use the default value. The location for the persisted portal logging file is \filename{\$PORTAL\_HOME/portal-loggers.properties}.
|
|
|
|
When displaying the log levels, the levels are displayed in alphabetical order based off the component name
|
|
|
|
\begin{figure}[!htb]
|
|
\centering
|
|
\scalebox{0.75}{\includegraphics*{figures/menu.png}}
|
|
\caption{Menu}
|
|
\label{fig:menu-loglevel}
|
|
\end{figure}
|
|
|
|
\begin{figure}[!htp]
|
|
\centering
|
|
\scalebox{0.75}{\includegraphics*{figures/log-levels.png}}
|
|
\caption{Log Levels}
|
|
\label{fig:log-levels}
|
|
\end{figure}
|
|
|
|
\begin{usecase}
|
|
{CHANGE LOG LEVELS}
|
|
{Authenticated User with change log level permission}
|
|
{The user is viewing the log levels after selecting it from the menu. Reference figure~\ref{fig:log-levels}}
|
|
\begin{enumerate}
|
|
\item User pages through the tabs to find the component to change the log level
|
|
\item User chooses which level to set the log to (see table~\ref{tab:logLevels})
|
|
\item User selects save to submit the change
|
|
\item A confirmation box will be presented to the user to confirm submission
|
|
\item Upon success the dialog boxes will disappear and a success message will be displayed to the user
|
|
\end{enumerate}
|
|
\end{usecase}
|