package io.quarkus.vertx.http.runtime;

import java.util.Optional;

import io.quarkus.runtime.annotations.ConfigGroup;
import io.quarkus.runtime.annotations.ConfigItem;

@ConfigGroup
public class AccessLogConfig {

    /**
     * If access logging is enabled. By default this will log via the standard logging facility
     */
    @ConfigItem(defaultValue = "false")
    public boolean enabled;

    /**
     * The access log pattern:
     *
     * If this is the string 'common', 'combined' or 'long' then this will use one of the specified named formats:
     * <ul>
     * <li>
     * common:<br />
     * %h %l %u %t "%r" %s %b
     * </li>
     * <li>
     * combined:<br />
     * %h %l %u %t "%r" %s %b "%{i,Referer}" "%{i,User-Agent}"
     * </li>
     * <li>
     * long:<br />
     * %r<br />
     * %{ALL_REQUEST_HEADERS}<br />
     * </li>
     * </ul>
     *
     * Otherwise consult the Quarkus documentation for the full list of variables that can be used.
     *
     */
    @ConfigItem(defaultValue = "common")
    public String pattern;

    /**
     * If logging should be done to a separate file.
     */
    @ConfigItem(defaultValue = "false")
    public boolean logToFile;

    /**
     * The access log file base name, defaults to 'quarkus' which will give a log file
     * name of 'quarkus.log'.
     *
     */
    @ConfigItem(defaultValue = "quarkus")
    public String baseFileName;

    /**
     * The log directory to use when logging access to a file
     *
     * If this is not set then the current working directory is used.
     */
    @ConfigItem
    public Optional<String> logDirectory;

    /**
     * The log file suffix
     */
    @ConfigItem(defaultValue = ".log")
    public String logSuffix;

    /**
     * The log category to use if logging is being done via the standard log mechanism (i.e. if base-file-name is empty).
     *
     */
    @ConfigItem(defaultValue = "io.quarkus.http.access-log")
    public String category;

    /**
     * If the log should be rotated daily
     */
    @ConfigItem(defaultValue = "true")
    public boolean rotate;

}

@@ -426,17 +426,17 @@
  pattern
-:
+.
 %0A     *%0A
@@ -468,27 +468,27 @@
 ing 
-'
+%60
 common
-', '
+%60, %60
 combined
 ' or
@@ -487,19 +487,19 @@
 ined
-'
+%60
  or 
-'
+%60
 long
-'
+%60
  the
@@ -560,21 +560,16 @@
    *
- %3Cul%3E
 %0A     * 
 %3Cli%3E
@@ -568,296 +568,163 @@
   * 
-%3Cli%3E%0A     * common:%3Cbr /%3E%0A     * %25h %25l %25u %25t %22%25r%22 %25s %25b%0A     * %3C/li%3E%0A     * %3Cli%3E%0A     * combined:%3Cbr /%3E%0A     * %25h %25l %25u %25t %22%25r%22 %25s %25b %22%25%7Bi,Referer%7D%22 %22%25%7Bi,User-Agent%7D%22%0A     * %3C/li%3E%0A     * %3Cli%3E%0A     * long:%3Cbr /%3E%0A     * %25r%3Cbr /%3E%0A     * %25%7BALL_REQUEST_HEADERS%7D%3Cbr /%3E%0A     * %3C/li%3E%0A     * %3C/ul%3E
+- common: %60%25h %25l %25u %25t %22%25r%22 %25s %25b%60%0A     * - combined: %60%25h %25l %25u %25t %22%25r%22 %25s %25b %22%25%7Bi,Referer%7D%22 %22%25%7Bi,User-Agent%7D%22%60%0A     * - long: %60%25r%5Cn%25%7BALL_REQUEST_HEADERS%7D%60
 %0A   
@@ -827,23 +827,43 @@
 e used.%0A
-
      *%0A
+     * @asciidoclet%0A
      */%0A

Improve documentation of quarkus.http.access-log.pattern