github.com/lmorg/murex@v0.0.0-20240217211045-e081c89cd4ef/docs/types/commonlog.md (about) 1 # `commonlog` 2 3 > Apache httpd "common" log format 4 5 ## Description 6 7 Apache httpd supports a few different log formats. This Murex type is for 8 parsing the "common" log format. 9 10 ## Detail 11 12 The code here is very rudimentary. If you have large log files or need more complex 13 data querying then this data-type is probably not the right tool. Maybe try one of 14 the following: 15 16 * [Firesword](https://github.com/lmorg/firesword) - for command line analysis 17 * [Plasmasword](https://github.com/lmorg/plasmasword) - exports fields to an sqlite3 or mysql database 18 19 ## Supported Hooks 20 21 * `Marshal()` 22 Supported though no unmarshalling is currently supported 23 * `ReadArray()` 24 Supported. Each line is considered an index (like with `str` data type) 25 * `ReadArrayWithType()` 26 Supported. Each line is considered an index with `commonlog` data type 27 * `ReadIndex()` 28 Entire log file is read and then the indexes are derived from there 29 * `ReadMap()` 30 Not supported, currently a work in progress 31 * `ReadNotIndex()` 32 Entire log file is read and then the indexes are derived from there 33 34 ## See Also 35 36 * [`*` (generic)](../types/generic.md): 37 generic (primitive) 38 * [`[[ Element ]]`](../parser/element.md): 39 Outputs an element from a nested structure 40 * [`cast`](../commands/cast.md): 41 Alters the data type of the previous function without altering it's output 42 * [`format`](../commands/format.md): 43 Reformat one data-type into another data-type 44 * [`str` (string)](../types/str.md): 45 string (primitive) 46 * [index](../parser/item-index.md): 47 Outputs an element from an array, map or table 48 49 ### Read more about type hooks 50 51 - [`ReadIndex()` (type)](../apis/ReadIndex.md): Data type handler for the index, `[`, builtin 52 - [`ReadNotIndex()` (type)](../apis/ReadNotIndex.md): Data type handler for the bang-prefixed index, `: Read from a data type one array element at a time 54 - [`WriteArray()` (type)](../apis/WriteArray.md): Write a data type, one array element at a time 55 - [`ReadMap()` (type)](../apis/ReadMap.md): Treat data type as a key/value structure and read its contents 56 - [`Marshal()` (type)](../apis/Marshal.md): Converts structured memory into a structured file format (eg for stdio) 57 - [`Unmarshal()` (type)](../apis/Unmarshal.md): Converts a structured file format into structured memory 58 59 <hr/> 60 61 This document was generated from [builtins/types/apachelogs/apachelogs_doc.yaml](https://github.com/lmorg/murex/blob/master/builtins/types/apachelogs/apachelogs_doc.yaml).