Logback error messages and their meanings
- contextSelector cannot be null
-
The FileNamePattern option
must be set before using
TimeBasedRollingPolicy
orFixedWindowRollingPolicy
-
The File option must be set before
FixedWindowRollingPolicy
-
No remote host or address is set
for
SocketAppender
-
No remote port is set for
SocketAppender
-
No
Layout
is set for appender - Specified number is not in proper int form, or not expected format.
-
No
TriggeringPolicy
was set for theRollingFileAppender
-
No
RollingPolicy
was set for theRollingFileAppender
Error codes and their meanings
- contextSelector cannot be null
-
The FileNamePattern option must be set before using
TimeBasedRollingPolicy
orFixedWindowRollingPolicy
-
The FileNamePattern option for both
TimeBasedRollingPolicy
andFixedWindowRollingPolicy
is mandatory.See the FixedWindowRollingPolicy javadoc for more information.
[top]
-
The File option must be set before
FixedWindowRollingPolicy
-
The File option is mandatory with
FixedWindowRollingPolicy
. Moreover, the File option must be set before theFixedWindowRollingPolicy
element.Refer to the logback manual on FixedWindowRollingPolicy for more information.
[top]
-
No remote host or address is set for
SocketAppender
-
A remote host or address is mandatory for SocketAppender.
You can specify the remote host in the configuration file like this:
<appender name="SOCKET" class="ch.qos.logback.classic.net.SocketAppender"> ... <param name="remoteHost" value="127.0.0.1"></param> ... </appender>
[top]
-
No remote port is set for
SocketAppender
-
A remote port is mandatory for SocketAppender.
You can specify the remote port in the configuration file like this:
<appender name="SOCKET" class="ch.qos.logback.classic.net.SocketAppender"> ... <param name="port" value="4560"></param> ... </appender>
[top]
-
No
Layout
is set for appender -
A
Layout
is mandatory forSMTPAppender
. It allows the appender format the logging events before sending the email. Two layouts are often used withSMTPAppender
:PatternLayout
andHTMLLayout
.You can specify the
Layout
in the configuration file like this:<appender name="SMTP" class="ch.qos.logback.classic.net.SMTPAppender"> ... <layout class="ch.qos.logback.classic.PatternLayout"> <param name="pattern" value="%-4relative [%thread] %-5level %class - %msg%n"></param> </layout> ... </appender>
You can see more examples in the HTMLLayout javadoc and the PatternLayout javadoc
[top]
- Specified number is not in proper int form, or not expected format.
-
When you specify the MaxFileSize to be used by the SizeBasedRollingPolicy, logback expects a rather precise format:
- The number has to be an integer
- You can add 'KB', 'MB' or 'GB' after the number.
Here are some correct values: 500KB, 15MB, 2GB.
[top]
-
No
TriggeringPolicy
was set for theRollingFileAppender
. -
The
RollingFileAppender
must be set up with aTriggeringPolicy
. It permits the Appender to know when the rollover must be activated.To find more information about
TriggeringPolicy
objects, please read the following javadocs:Please note that the
TimeBasedRollingPolicy
is a TriggeringPolicy and andRollingPolicy
at the same time.[top]
-
No
RollingPolicy
was set for theRollingFileAppender
. -
The
RollingFileAppender
must be set up with aRollingPolicy
. It permits the Appender to know what to do when a rollover is requested.To find more information about
RollingPolicy
objects, please read the following javadocs:Please note that the
TimeBasedRollingPolicy
is aTriggeringPolicy
and and RollingPolicy at the same time.[top]