## Logback error messages and their meanings

The contextSelector cannot be null in `StaticLoggerBinder`.

An `IllegalStateException` is thrown when no ContextSelector could be set for logback's `StaticLoggerBinder`. In principle, this error can only occur when the context selector is expressly specified by the user, and when that context selector cannot not be instantiated correctly.

It should not happen when you are using the default or JNDI context selectors.

The FileNamePattern option must be set before using `TimeBasedRollingPolicy` or `FixedWindowRollingPolicy`

The FileNamePattern option for both `TimeBasedRollingPolicy` and `FixedWindowRollingPolicy` is mandatory.

See the FixedWindowRollingPolicy javadoc for more information.

The File option must be set before `FixedWindowRollingPolicy`

The File option is mandatory with `FixedWindowRollingPolicy`. Moreover, the File option must be set before the `FixedWindowRollingPolicy` element.

Refer to the logback manual on FixedWindowRollingPolicy for more information.

Prudent mode is not supported with `FixedWindowRollingPolicy`.

Given that `FixedWindowRollingPolicy` performs multiple file rename operations suring roll over, and that these operations cannot be guaranteed to be safe in a multi-JVM context, prudent mode is not allowed in conjuction with a `FixedWindowRollingPolicy`.

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 as follows.

<appender name="SOCKET" class="ch.qos.logback.classic.net.SocketAppender"> ... <remoteHost>127.0.0.1</remoteHost> ... </appender>

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"> ... <port>4560</port> ... </appender>

No `Layout` is set for SMTPAppender

A `Layout` is mandatory for `SMTPAppender`. It allows SMPTPAppender to format logging events before sending an email.

You can specify the `Layout` in a configuration file as follows:

<appender name="SMTP" class="ch.qos.logback.classic.net.SMTPAppender"> ... <layout class="ch.qos.logback.classic.PatternLayout"> <pattern>%date [%thread] %-5level %logger - %msg%n"></pattern> </layout> ... </appender>

SMTPAppender is known to work well with PatternLayout and HTMLLayout.

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.

No `TriggeringPolicy` was set for the `RollingFileAppender`.

The `RollingFileAppender` must be set up with a `TriggeringPolicy`. It permits the Appender to know when the rollover must be activated.

To find more information about `TriggeringPolicy` objects, please read the following javadocs:

- `SizeBasedTriggeringPolicy`
- `TimeBasedRollingPolicy`

Please note that the `TimeBasedRollingPolicy` is a TriggeringPolicy and and `RollingPolicy` at the same time.

No `RollingPolicy` was set for the `RollingFileAppender`.

The `RollingFileAppender` must be set up with a `RollingPolicy`. 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:

- `FixedWindowRollingPolicy`
- `TimeBasedRollingPolicy`

Please note that the `TimeBasedRollingPolicy` is a `TriggeringPolicy` and and RollingPolicy at the same time.

SyslogAppender does not admit a layout parameter.

Given that the format of a syslog request follows strict rules, you cannot freely specify the layout to be used with SyslogAppender. However, you can use SuffixPattern option instead to influence the contents of the message sent to the syslog daemon.

For more information on SyslogAppeder please refer to the its documentation.