<commit_before># logalyzer


It analyzes MarkLogic error logs (a bit).

Further doc at https://github.com/chamlin/logalyzer/wiki

Also utils for
  - combining logs
  - creating plots
  - extracting reports

Goal:  decent, fast.

  - Can transform log names to consolidate by node name.
  - Granularity by hour, ten minutes, minutes.
  - Junk events by regex.
  - Pretty fast.
  - requires only basic perl, plots require gnuplot
  
<commit_msg>notes on json2csv<commit_after># logalyzer


It analyzes MarkLogic error logs (a bit).

Further doc at https://github.com/chamlin/logalyzer/wiki

Also utils for
  - combining logs
  - creating plots
  - extracting reports

Goal:  decent, fast.

  - Can transform log names to consolidate by node name.
  - Granularity by hour, ten minutes, minutes.
  - Junk events by regex.
  - Pretty fast.
  - requires only basic perl, plots require gnuplot

# json2csv.pl

Does
  - parse request log lines
  - outputs as csv
  - will put quotes around values that contain the separater
  - can config for first columns and can add constant columns (node, port, for example) 

{'fraction_non_alphanumeric': 0.0669683257918552, 'fraction_numerical': 0.0018099547511312218, 'mean_word_length': 3.142322097378277, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '692868', 'n_tokens_mistral': 351, 'n_tokens_neox': 336, 'n_words': 140}