Skip to content
This repository has been archived by the owner on Dec 31, 2022. It is now read-only.

Commit

Permalink
Fixes log parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
gilnobrega committed Jan 1, 2022
1 parent b3eb6e9 commit 0ff64a1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion environment_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ environment_config:
fields: # set of fields for command
version: # key name
const: true # optional, default to TRUE
default: 1.7.7.2 # optional, default value for key, if not provided key will be required during command run
default: 1.7.7.3 # optional, default value for key, if not provided key will be required during command run
dotenv: true # optional, default to FALSE, if this field should be added to .env file

10 changes: 5 additions & 5 deletions lib/debug.dart
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class Log {
_debugFile = io.File(debugPath);

if (_binaryName == "flora")
floraProxy = "flora_proxy:";
floraProxy = "flora_proxy: ";
else
floraProxy = "";

Expand Down Expand Up @@ -254,7 +254,7 @@ class Log {

try {
RegExp filtersRegex = RegExp(
"([0-9-]+)T([0-9:]+)\\.([0-9]+) harvester $floraProxy [a-z]+\\.harvester\\.harvester\\s*:\\s+INFO\\s+([0-9]+) plots were eligible for farming \\S+ Found ([0-9]+) proofs\\. Time: ([0-9\\.]+) s\\. Total ([0-9]+) plots",
"([0-9-]+)T([0-9:]+)\\.([0-9]+) harvester $floraProxy[a-z]+\\.harvester\\.harvester\\s*:\\s+INFO\\s+([0-9]+) plots were eligible for farming \\S+ Found ([0-9]+) proofs\\. Time: ([0-9\\.]+) s\\. Total ([0-9]+) plots",
multiLine: true);

var matches = filtersRegex.allMatches(contents).toList();
Expand Down Expand Up @@ -308,7 +308,7 @@ class Log {

try {
RegExp signagePointsRegex = RegExp(
"([0-9-]+)T([0-9:]+)\\.([0-9]+) full_node $floraProxy [a-z]+\\.full\\_node\\.full\\_node\\s*:\\s+INFO\\W+Finished[\\S ]+ ([0-9]+)\\/64",
"([0-9-]+)T([0-9:]+)\\.([0-9]+) full_node $floraProxy[a-z]+\\.full\\_node\\.full\\_node\\s*:\\s+INFO\\W+Finished[\\S ]+ ([0-9]+)\\/64",
multiLine: true);

var matches = signagePointsRegex.allMatches(contents).toList();
Expand Down Expand Up @@ -381,7 +381,7 @@ class Log {

try {
RegExp shortSyncsRegex = RegExp(
"([0-9-]+)T([0-9:]+)\\.([0-9]+) full_node $floraProxy [a-z]+\\.full\\_node\\.full\\_node\\s*:\\s+INFO\\W+Starting batch short sync from ([0-9]+) to height ([0-9]+)",
"([0-9-]+)T([0-9:]+)\\.([0-9]+) full_node $floraProxy[a-z]+\\.full\\_node\\.full\\_node\\s*:\\s+INFO\\W+Starting batch short sync from ([0-9]+) to height ([0-9]+)",
multiLine: true);

var matches = shortSyncsRegex.allMatches(contents).toList();
Expand Down Expand Up @@ -434,7 +434,7 @@ class Log {
}

RegExp errorsRegex = RegExp(
"([0-9-]+)T([0-9:]+)\\.([0-9]+) farmer $floraProxy [a-z]+\\.farmer\\.farmer\\s*:\\s+ERROR\\s+$errorText",
"([0-9-]+)T([0-9:]+)\\.([0-9]+) farmer $floraProxy[a-z]+\\.farmer\\.farmer\\s*:\\s+ERROR\\s+$errorText",
multiLine: true);

var matches = errorsRegex.allMatches(contents).toList();
Expand Down

0 comments on commit 0ff64a1

Please sign in to comment.