Package org.opencms.report
Class CmsLogReport
- java.lang.Object
-
- org.opencms.report.A_CmsReport
-
- org.opencms.report.CmsLogReport
-
- All Implemented Interfaces:
I_CmsReport
public class CmsLogReport extends A_CmsReport
Report class used for the logfile.This prints all messages in the logfile at INFO level.
- Since:
- 6.0.0
-
-
Field Summary
-
Fields inherited from interface org.opencms.report.I_CmsReport
FORMAT_DEFAULT, FORMAT_ERROR, FORMAT_HEADLINE, FORMAT_NOTE, FORMAT_OK, FORMAT_WARNING, REPORT_TYPE_EXTENDED, REPORT_TYPE_SIMPLE
-
-
Constructor Summary
Constructors Constructor Description CmsLogReport(java.util.Locale locale, java.lang.Class<?> channel)
Constructs a new report using the provided locale for the output language, using the provided Java class for the log channel.CmsLogReport(java.util.Locale locale, java.lang.Object channel)
Constructs a new report using the provided locale for the output language, using the provided Java class for the log channel.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getReportUpdate()
Updates this report, this processes all new output added since the last call to this method.void
print(java.lang.String value, int format)
Prints a String to the report, using the indicated formatting.void
println()
Adds a line break to the report.void
println(java.lang.Throwable t)
Adds an Exception to the report, ensuring that the Exception content is processed to generate a valid output esp.-
Methods inherited from class org.opencms.report.A_CmsReport
addError, addWarning, formatRuntime, getErrors, getLastEntryTime, getLocale, getMessages, getReportUpdate, getRuntime, getSiteRoot, getWarnings, hasError, hasWarning, init, print, print, print, println, println, println, println, printMessageWithParam, printMessageWithParam, removeSiteRoot, resetRuntime, setLastEntryTime
-
-
-
-
Constructor Detail
-
CmsLogReport
public CmsLogReport(java.util.Locale locale, java.lang.Class<?> channel)
Constructs a new report using the provided locale for the output language, using the provided Java class for the log channel.- Parameters:
locale
- the locale to use for the report output messageschannel
- the log channel
-
CmsLogReport
public CmsLogReport(java.util.Locale locale, java.lang.Object channel)
Constructs a new report using the provided locale for the output language, using the provided Java class for the log channel.- Parameters:
locale
- the locale to use for the report output messageschannel
- the log channel (usually a string with the package name, or a class)
-
-
Method Detail
-
getReportUpdate
public java.lang.String getReportUpdate()
Description copied from interface:I_CmsReport
Updates this report, this processes all new output added since the last call to this method.This is only required in case the output is written to a HTML page, if the shell output is used, this will just return an empty String.
- Returns:
- new elements that have been added to the report and not yet processed.
- See Also:
I_CmsReport.getReportUpdate()
-
print
public void print(java.lang.String value, int format)
Description copied from class:A_CmsReport
Prints a String to the report, using the indicated formatting.Use the constants starting with
FORMAT
from this interface to indicate which formatting to use.- Specified by:
print
in classA_CmsReport
- Parameters:
value
- the message container to addformat
- the formatting to use for the output- See Also:
A_CmsReport.print(java.lang.String, int)
-
println
public void println()
Description copied from interface:I_CmsReport
Adds a line break to the report.- See Also:
I_CmsReport.println()
-
println
public void println(java.lang.Throwable t)
Description copied from interface:I_CmsReport
Adds an Exception to the report, ensuring that the Exception content is processed to generate a valid output esp. for HTML pages.The exception will be stored and the output will later be processed in a special way.
- Parameters:
t
- the exception to add- See Also:
I_CmsReport.println(java.lang.Throwable)
-
-