Skip to content

Commit

Permalink
Adding file level logging of input file glob hashes (Silly logging) (#…
Browse files Browse the repository at this point in the history
…682)

* File Hashes

* Better formating

* Log File

* Change files

* Log file level input file hashes to a JSON file

* Update @lage-run-hasher-0f260ee4-57af-4235-960d-d86ed80e935a.json

Title

* Change files

* Silly Log

* Remove old change file

---------

Co-authored-by: brunoru <[email protected]>
  • Loading branch information
BrunoRDS and brunoru authored Jul 11, 2023
1 parent e6df01d commit e7dbec3
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "Log file level input file hashes to silly logs",
"packageName": "@lage-run/hasher",
"email": "[email protected]",
"dependentChangeType": "patch"
}
2 changes: 1 addition & 1 deletion docs/docs/Reference/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Usage: `lage [run] <command1> [command2...commandN] [options] run commands`
--reset-cache resets the cache, filling it after a run
--skip-local-cache skips caching locally
--profile [profile] writes a run profile into a file that can be processed by Chromium devtool
--nodearg <nodeArg> arguments to be passed to node (e.g. --nodearg="--max_old_space_size=1234 --heap-prof" - set via "NODE_OPTIONS" environment variable
--nodearg <nodeArg> arguments to be passed to node (e.g. --nodearg="--max_old_space_size=1234 --heap-prof" - set via "NODE_OPTIONS" environment variable)
--continue continues the run even on error
-h, --help display help for command
```
Expand Down
3 changes: 3 additions & 0 deletions packages/hasher/src/TargetHasher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,9 @@ export class TargetHasher {
if (this.logger !== undefined) {
const globalInputsHash = hashStrings(Object.values(this.globalInputsHash ?? {}));
this.logger.verbose(`Global inputs hash: ${globalInputsHash}`);
// Log global input hashs to log file
const globalInputsHashJson = JSON.stringify(this.globalInputsHash, null, 2);
this.logger.silly(globalInputsHashJson);
}
}

Expand Down

0 comments on commit e7dbec3

Please sign in to comment.