Skip to content

Instantly share code, notes, and snippets.

@mago0
Created January 4, 2018 20:54
Show Gist options
  • Save mago0/373eb5b565b9615d8639530d96a63496 to your computer and use it in GitHub Desktop.
Save mago0/373eb5b565b9615d8639530d96a63496 to your computer and use it in GitHub Desktop.
# Sample Line
2018-01-04T19:40:03.524Z 47bca216-f17d-11e7-b2cc-9d951c38274e Executing (default): SELECT count(*) AS `count` FROM `stream_target` AS `stream_target` WHERE `stream_target`.`stream_id` IS NULL AND `stream_target`.`hls_playback_url` LIKE '%/event/%'; { logging: [Function: prettyConsoleLog], plain: true, raw: true, showWarnings: false, where: '`stream_target`.`stream_id` IS NULL AND `stream_target`.`hls_playback_url` LIKE \'%/event/%\'', hooks: true, dataType: INTEGER { options: { length: undefined }, _length: undefined, _zerofill: undefined, _decimals: undefined, _precision: undefined, _scale: undefined, _unsigned: undefined }, includeIgnoreAttributes: false, limit: null, offset: null, order: null, attributes: [ [ [Object], 'count' ] ], type: 'SELECT' }
# Rule
testGreedy %{_greedy_to_json:garbage}
# Helper
_greedy_to_json %{regex(".*(?=\\{ logging\\: )")}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment