How to: use your own tag name (*.imaginary for this example)
@type parser
    key_name log
    reserve_data true
@type multi_format
        # access logs parser
format regexp
            expression /^[^ ]* [^ ]* [^ ]* \[(?
[^\]]*)\] "(?
\S+)(?: +(?
[^ ]*) +\S*)?" (?
```
[^ ]*) (?
[^ ]*) (?
[^ ]*)$/
            types code:integer,size:integer,response_time:float
            time_key time
            time_format %d/%b/%Y %H:%M:%S
```
# warnings / error logs parser
format none
            message_key message
@type rewrite_tag_filter

    # Logs with code field are access logs, and logs without are error logs
key code
        pattern ^.+$
        tag ${tag}.access
key code
        pattern ^.+$
        invert true
        tag ${tag}.error
```

In the end, access records are tagged with `*.imaginary.access`, and warning /
error records are tagged with `*.imaginary.error`.