This repository was archived by the owner on Feb 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 682
feat: allow logs to be written to a file by providing the --logging.file argument
#4195
Merged
Merged
Changes from all commits
Commits
Show all changes
66 commits
Select commit
Hold shift + click to select a range
c7f86d3
Basic implementation of logging to file
jeffsmale90 54b85c5
Simplify logging
jeffsmale90 b0ca2e9
Simplify regex for inserting timestamps
jeffsmale90 a397b6f
Remove --timestamps argument
jeffsmale90 0f13a36
Use a persistent filehandle instead of calling 'appendFile' each tile…
jeffsmale90 b206a42
Introduce tests for logger, fail validation if path is not w
jeffsmale90 d1ec4fe
Update tests to use per-test log files
jeffsmale90 feb57bd
Resolve invalid path
jeffsmale90 0b8673f
In windows, use reserved path 'c:\NUL' for invalid path
jeffsmale90 6d73be8
Revert changes and just await the rejection
jeffsmale90 8b4ae04
Let's do use the NUL workaround for windows
jeffsmale90 4b6159e
Attempt to get tests to passing state
jeffsmale90 e2db28f
Use current working directory as invalid file path
jeffsmale90 d2db1a4
Tidy up logging
jeffsmale90 4e64fc7
Create file when validating logging.file path is writable.
jeffsmale90 8423a65
Move logger into cli project, allow caller to close underlying fileha…
jeffsmale90 fcf39ed
Revert unrelated changes, fix flaky initialisation of logger
jeffsmale90 22ec214
Fix error when no logging config exists
jeffsmale90 37e1616
Switch to use 'fs.openSync()' instead of 'fs.writeSync()' because win…
jeffsmale90 44a7107
Work in progress. Move logger into @ganache/utils, resolve filehandle…
jeffsmale90 b02821d
Improve tests, implementation, support for filecoin
jeffsmale90 4e7ddd6
Finish tidying up implementation. Broke the console.log tests though …
jeffsmale90 f9aac47
Support setting both file and logger, refactor tangentially related test
jeffsmale90 6cc6fb2
tidy up implementation, fix tests, don't accept filehandle as logging…
jeffsmale90 303330d
Update package-lock.json - adds reference to @ganache/utils
jeffsmale90 7edf108
Upgrade @ganache/utils
jeffsmale90 ca8f581
Update reference to Logger type in tests
jeffsmale90 04a0674
Modify 'EPERM' test to support Windows (who does some freaky stuff wh…
jeffsmale90 8352f82
Pin @types/sinon
jeffsmale90 5a556d6
Add test to ensure that resolved file descriptor is append only
jeffsmale90 1ff9eb9
Fix failing tests
jeffsmale90 d08ff26
Merge remote-tracking branch 'origin/feat/logging' into feat/logging
jeffsmale90 b577089
Add test to ensure that provider.disconnect() closes the file descriptor
jeffsmale90 cc87e1e
Fix @jeffsmale90's broken regex :)
jeffsmale90 0d445cb
Fix @jeffsmale90's broken regex :)
jeffsmale90 a235c7a
Fix @jeffsmale90's broken regex :)
jeffsmale90 838b9dc
Comments and refactor from review
jeffsmale90 ff67775
Oops - messed up comments
jeffsmale90 2af6a26
Use WriteStream instead of appending to an open filehandle directly. …
jeffsmale90 faad325
Fix up my mistakes
jeffsmale90 33849ce
Close file handle correctly in test
jeffsmale90 67d4db3
Refactor logging options tests, correctly remove fixture files
jeffsmale90 685b6f9
Close test log files correctly in logging-options tests
jeffsmale90 acc4bef
Remove unnecessary import
jeffsmale90 12f3bd1
Don't await `getProvider()` twice
jeffsmale90 247454c
change 'writing' to `'write' because it makes sense this way
jeffsmale90 daa040a
Refinement as per PR
jeffsmale90 295ab1a
New line at end of tsconfig files
jeffsmale90 eb8d2b8
Assert that logs are appended to an existing file. Refactor logging-o…
jeffsmale90 970fb76
Use tmp-promise to resolve temporary files for use in tests
jeffsmale90 ec7d5a3
Merge branch 'develop' into feat/logging
jeffsmale90 d47acdd
Fix baseLogger
jeffsmale90 39a7adb
Support CRLF and LF line endings in multiline log messages
jeffsmale90 180b9e8
Use tmp-promise in 'closes the logging fileDescriptor' test
jeffsmale90 0a80a3e
Await tests that user tmp.with(File|Dir), remove thrown Error from te…
jeffsmale90 0fb659e
TIL: tmp.dir() only cleans up if the dir is empty. Some formatting fi…
jeffsmale90 0d7cb88
Use unsafeCleanup to force tmp to remove the temp directory, even whe…
jeffsmale90 4a76b48
Don't explicitly unlink filepath, rely on tmp-promise to clean itself…
jeffsmale90 c1d9565
Update src/chains/ethereum/options/src/logging-options.ts
jeffsmale90 7671bea
Move dep to devdep, fix EOL discrepancy in link-ts-references
jeffsmale90 084b583
Merge branch 'develop' into feat/logging
jeffsmale90 b52db3e
Move tmp-promise to devDependencies
jeffsmale90 6a072f7
Reorder deps, and fix package-locks
jeffsmale90 6d8cce1
Merge branch 'develop' into feat/logging
davidmurdoch 2213061
Revert those silly package-lock files
jeffsmale90 50a614c
Doing the tmp-promise shuffle
jeffsmale90 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.