## Attributes (4)

- file-size - The size of the log file in bytes.

  Type | LONG
  Where is the attribute stored? | runtime
  Access Type | read-only
  Stability Level | default
  Raw DMR model |
      {
          "type" : {
              "TYPE_MODEL_VALUE" : "LONG"
          },
          "description" : "The size of the log file in bytes.",
          "expressions-allowed" : false,
          "required" : true,
          "nillable" : false,
          "stability" : "default",
          "access-type" : "read-only",
          "storage" : "runtime",
          "restart-required" : null,
          "capability-reference" : null
      }

- last-modified-time - The date, in milliseconds, the file was last modified.

  Type | LONG
  Where is the attribute stored? | runtime
  Access Type | read-only
  Stability Level | default
  Raw DMR model |
      {
          "type" : {
              "TYPE_MODEL_VALUE" : "LONG"
          },
          "description" : "The date, in milliseconds, the file was last modified.",
          "expressions-allowed" : false,
          "required" : true,
          "nillable" : false,
          "stability" : "default",
          "access-type" : "read-only",
          "storage" : "runtime",
          "restart-required" : null,
          "capability-reference" : null
      }

- last-modified-timestamp - The date, in ISO 8601 format, the file was last modified.

  Type | STRING
  Where is the attribute stored? | runtime
  Access Type | read-only
  Stability Level | default
  Raw DMR model |
      {
          "type" : {
              "TYPE_MODEL_VALUE" : "STRING"
          },
          "description" : "The date, in ISO 8601 format, the file was last modified.",
          "expressions-allowed" : false,
          "required" : true,
          "nillable" : false,
          "min-length" : 1,
          "max-length" : 2147483647,
          "stability" : "default",
          "access-type" : "read-only",
          "storage" : "runtime",
          "restart-required" : null,
          "capability-reference" : null
      }

- stream - Provides the server log as a response attachment. The response result value is the unique id of the attachment.

  Type | STRING
  Is the attribute nillable? | true
  Where is the attribute stored? | runtime
  Access Type | read-only
  Stability Level | default
  Raw DMR model |
      {
          "type" : {
              "TYPE_MODEL_VALUE" : "STRING"
          },
          "description" : "Provides the server log as a response attachment. The response result value is the unique id of the attachment.",
          "expressions-allowed" : false,
          "required" : false,
          "nillable" : true,
          "min-length" : 1,
          "max-length" : 2147483647,
          "stability" : "default",
          "access-type" : "read-only",
          "storage" : "runtime",
          "restart-required" : null,
          "capability-reference" : null
      }

## Operations (1)

- read-log-file - Reads the contents of a log file. The file must be in the jboss.server.log.dir and must be defined as a file-handler, periodic-rotating-file-handler or size-rotating-file-handler.

  Request Parameter | Type | Required | Expressions Allowed | Default value | Description
  --- | --- | --- | --- | --- | ---
  encoding | STRING | false | true |  | The character encoding used to read the file.
  lines | INT | false | true | 10 | The number of lines to read from the file. A value of -1 will read all log lines.
  skip | INT | false | true | 0 | The number of lines to skip before reading.
  tail | BOOLEAN | false | true | true | Reads from the end of the file.

  ### Reply properties

  Type
    LIST
  Value Type

        STRING

  Raw DMR model |
      {
          "operation-name" : "read-log-file",
          "description" : "Reads the contents of a log file. The file must be in the jboss.server.log.dir and must be defined as a file-handler, periodic-rotating-file-handler or size-rotating-file-handler.",
          "request-properties" : {
              "encoding" : {
                  "type" : {
                      "TYPE_MODEL_VALUE" : "STRING"
                  },
                  "description" : "The character encoding used to read the file.",
                  "expressions-allowed" : true,
                  "required" : false,
                  "nillable" : true,
                  "min-length" : 1,
                  "max-length" : 2147483647,
                  "stability" : "default"
              },
              "lines" : {
                  "type" : {
                      "TYPE_MODEL_VALUE" : "INT"
                  },
                  "description" : "The number of lines to read from the file. A value of -1 will read all log lines.",
                  "expressions-allowed" : true,
                  "required" : false,
                  "nillable" : true,
                  "default" : 10,
                  "min" : -1,
                  "max" : 2147483647,
                  "stability" : "default"
              },
              "skip" : {
                  "type" : {
                      "TYPE_MODEL_VALUE" : "INT"
                  },
                  "description" : "The number of lines to skip before reading.",
                  "expressions-allowed" : true,
                  "required" : false,
                  "nillable" : true,
                  "default" : 0,
                  "min" : 0,
                  "max" : 2147483647,
                  "stability" : "default"
              },
              "tail" : {
                  "type" : {
                      "TYPE_MODEL_VALUE" : "BOOLEAN"
                  },
                  "description" : "Reads from the end of the file.",
                  "expressions-allowed" : true,
                  "required" : false,
                  "nillable" : true,
                  "default" : true,
                  "stability" : "default"
              }
          },
          "reply-properties" : {
              "type" : {
                  "TYPE_MODEL_VALUE" : "LIST"
              },
              "value-type" : {
                  "TYPE_MODEL_VALUE" : "STRING"
              }
          },
          "access-constraints" : {"sensitive" : {"view-server-logs" : {"type" : "logging"}}},
          "stability" : "default",
          "read-only" : true,
          "runtime-only" : true
      }