.TH "SnapRAID Log Format" 1 .SH NAME snapraid_log \- SnapRAID Log Format .SH DESCRIPTION This document describes the structured log tags output by SnapRAID, which are designed to be used by tools monitoring the SnapRAID processing state. The tags provide information in an easy\-to\-parse format, ideal for automation and integration. .PP To capture these structured log tags, you must use the \`\-\-log\` option with SnapRAID. .PP You can direct the output to a specific file, or force the output to the standard output or standard error using the special arguments \`>&1\` or \`>&2\`. Note that these arguments often need to be quoted on the command line to prevent the shell from interpreting them. .PP Example: .PP .RS 4 snapraid status \-\-log \[dq]>&2\[dq] .PD 0 .PD .RE .PP The output tags strictly adhere to the following format: .PP NAME:VALUE:VALUE:VALUE... .PD 0 .PD .TP .B NAME This is the primary tag identifier, always a lowercase string without spaces (e.g., \`summary\`, \`block\`). .TP .B VALUE Following the \`NAME\`, these can be additional sub\-identifiers, descriptive names (like a disk name), or numeric/string data values. They are separated by a colon \`:\`. .TP .B Each tag is terminated by an end\-of\-line character. .PP This document provides a summary of the tags generated by SnapRAID. For the most detailed and up\-to\-date information regarding the meaning and context of the values, it is recommended to check the source code\'s \`log_tag()\` statements. .PP When a path is output, it is always escaped using a backslash (\\) as the escape character. .PP The following characters are escaped into sequences: .RS 4 .PD 0 .HP 4 .I The colon is escaped to \\d. .HP 4 .I The newline is escaped to \\n. .HP 4 .I The carriage return is escaped to \\r. .HP 4 .I The backslash is escaped to \\\\. .PD .RE .PP Some tags are output only when the \`\-\-gui\` or \`\-\-gui\-verbose\` option is used. They provide extra verbose state and runtime progress only useful for a GUI interface. In GUI mode, the structured log is intended to be consumed by the GUI. Fatal errors are therefore not duplicated to standard error when they are successfully written to the log. If the log is unavailable or writing it fails, the fatal error is printed to standard error as a fallback. .PP Integer values are marked as \`uint\` when they are unsigned and as \`int\` when they are signed. However, for practical purposes you can treat all of them as signed integers. All integer values should be assumed to be 64 bits wide, regardless of the signed/unsigned marker. Floating point values are marked as \`float\`. .SH CONFIGURATION TAGS These tags report the memory usage and global configuration. .TP .B conf:file: Configuration file loaded (escaped). .TP .B conf:missing: Operating without a configuration file. .TP .B blocksize: The configured block size in bytes (uint). .TP .B data::: The data disks as defined in the configuration file. .RS 4 .PD 0 .HP 4 .I The assigned name of the disk. .HP 4 .I The directory entry point of the disk. .HP 4 .I The UUID of the filesystem containing the dir. .PD .RE .TP .B mode: The RAID mode used. One of \`par1\`, \`par2\`, \`par3\`, \`par4\`, \`par5\`, \`par6\` or \`parz\`. The number indicates the maximum number of simultaneous disk failures the array can withstand. .TP .B [/]:: The parity files as defined in the configuration file. .RS 4 .PD 0 .HP 4 .I [/] One of \`parity\`, \`2\-parity\`, ..., \`6\-parity\`. This corresponds to the level of redundancy. In case of split parity, the parity name is followed by \`/N\` to indicate the split index, where N starts from 0. The \`/0\` is always omitted. .HP 4 .I The path (escaped). .HP 4 .I The UUID of the filesystem containing the path. .PD .RE .TP .B fsinfo_data::: The filesystem information of the specified data disk. .RS 4 .PD 0 .HP 4 .I The size of the data disk (uint). .HP 4 .I The free size in the data disk (uint). .PD .RE .TP .B fsinfo_parity::: The filesystem information of the specified parity disk. In case of multiple splits this is the sum of the sizes of all splits. .RS 4 .PD 0 .HP 4 .I The size of the parity disk (uint). .HP 4 .I The free size in the parity disk (uint). .PD .RE .TP .B fsinfo_data_split:::::