mirror of
https://github.com/webrecorder/browsertrix-crawler.git
synced 2025-10-19 06:23:16 +00:00
behavior logging: remove last line dupe check for behavior logs (#874)
Shouldn't skip multiple log messages, as this is unexpected behavior for user-defined behaviors.
This commit is contained in:
parent
aba065c8fb
commit
18fe5a9676
3 changed files with 6 additions and 12 deletions
|
@ -19,7 +19,7 @@
|
||||||
"@novnc/novnc": "1.4.0",
|
"@novnc/novnc": "1.4.0",
|
||||||
"@puppeteer/replay": "^3.1.1",
|
"@puppeteer/replay": "^3.1.1",
|
||||||
"@webrecorder/wabac": "^2.23.8",
|
"@webrecorder/wabac": "^2.23.8",
|
||||||
"browsertrix-behaviors": "^0.9.1",
|
"browsertrix-behaviors": "^0.9.2",
|
||||||
"client-zip": "^2.4.5",
|
"client-zip": "^2.4.5",
|
||||||
"css-selector-parser": "^3.0.5",
|
"css-selector-parser": "^3.0.5",
|
||||||
"fetch-socks": "^1.3.0",
|
"fetch-socks": "^1.3.0",
|
||||||
|
|
|
@ -178,7 +178,6 @@ export class Crawler {
|
||||||
|
|
||||||
customBehaviors = "";
|
customBehaviors = "";
|
||||||
behaviorsChecked = false;
|
behaviorsChecked = false;
|
||||||
behaviorLastLine?: string;
|
|
||||||
|
|
||||||
browser: Browser;
|
browser: Browser;
|
||||||
storage: S3StorageSync | null = null;
|
storage: S3StorageSync | null = null;
|
||||||
|
@ -667,7 +666,6 @@ export class Crawler {
|
||||||
pageUrl: string,
|
pageUrl: string,
|
||||||
workerid: WorkerId,
|
workerid: WorkerId,
|
||||||
) {
|
) {
|
||||||
let behaviorLine;
|
|
||||||
let message;
|
let message;
|
||||||
let details;
|
let details;
|
||||||
|
|
||||||
|
@ -711,11 +709,7 @@ export class Crawler {
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case "info":
|
case "info":
|
||||||
behaviorLine = JSON.stringify(data);
|
logger.info(message, details, context);
|
||||||
if (behaviorLine !== this.behaviorLastLine) {
|
|
||||||
logger.info(message, details, context);
|
|
||||||
this.behaviorLastLine = behaviorLine;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "error":
|
case "error":
|
||||||
|
|
|
@ -1595,10 +1595,10 @@ browserslist@^4.24.0:
|
||||||
node-releases "^2.0.18"
|
node-releases "^2.0.18"
|
||||||
update-browserslist-db "^1.1.1"
|
update-browserslist-db "^1.1.1"
|
||||||
|
|
||||||
browsertrix-behaviors@^0.9.1:
|
browsertrix-behaviors@^0.9.2:
|
||||||
version "0.9.1"
|
version "0.9.2"
|
||||||
resolved "https://registry.yarnpkg.com/browsertrix-behaviors/-/browsertrix-behaviors-0.9.1.tgz#55bf51e43ddd88b3261e5ca570019415542fa0cc"
|
resolved "https://registry.yarnpkg.com/browsertrix-behaviors/-/browsertrix-behaviors-0.9.2.tgz#b5bee47d15014a05a873d8cc6ea8917bfa61d5c8"
|
||||||
integrity sha512-NcEcg0sQmKlIy4PesZa9Vr7HRmjCLGF7I278SamQE54WiHyNzKiRQnYVA2A/MloGoSM1mQQq/oPXQ0znx1gUXQ==
|
integrity sha512-d7rLNKXaiD83S4uXKBUf2x9UzmMjbrqKoO820KVqzWtlpzqnXFUsqN/wKvMSiNbDzmL1+G9Um7Gwb1AjD0djCw==
|
||||||
dependencies:
|
dependencies:
|
||||||
query-selector-shadow-dom "^1.0.1"
|
query-selector-shadow-dom "^1.0.1"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue