# Generalities

<document>
<question> The FileNamePattern option must be set before using `TimeBasedRollingPolicy` or `FixedWindowRollingPolicy` . </question> <answer>

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

See the FixedWindowRollingPolicy javadoc for more information.

</answer> <question>

The File name option must be set before `FixedWindowRollingPolicy`.

</question> <answer>

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

See the logback manual's chapter about FixedWindowRollingPolicy for more information.

</answer> <question> No remote host or address is set for `SocketAppender` . </question> <answer>

A remote host or address is mandatory for SocketAppender.

You can specify the remote host in the configuration file like this:

... ... </answer> <question> No remote port is set for `SocketAppender` . </question> <answer>

A remote port is mandatory for SocketAppender.

You can specify the remote port in the configuration file like this:

... ... </answer> <question> No `Layout` is set for appender </question> <answer>

A `Layout` is mandatory for `SMTPAppender` . It allows the appender format the logging events before sending the email. Two layouts are often used with `SMTPAppender` : `PatternLayout` and `HTMLLayout` .

You can specify the `Layout` in the configuration file like this:

... ...

You can see more examples in the HTMLLayout javadoc and the PatternLayout javadoc .

</answer> <question> Specified number is not in proper int form, or not expected format. </question> <answer>

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.

</answer> <question> No `TriggeringPolicy` was set for the `RollingFileAppender`. </question> <answer>

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.

</answer> <question> No `RollingPolicy` was set for the `RollingFileAppender`. </question> <answer>

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.

</answer>
</document>