Skip to content

Conversation

@enigbe
Copy link
Owner

@enigbe enigbe commented Dec 15, 2024

No description provided.

* Add flexible log writer interface for multiple destinations
* Implement filesystem writing capability via FilesystemLogger
* Prefix LDK-based objects with 'Ldk' for consistency
* Add configuration options for log file path and log level
* Add support for user-provided custom logger to
  write logs to, allowing users to provide any logger
  that implements LogWriter
* Add test to cover this use case, implementing Log-
  Writer for the mock, in-memory MockLogger.
This commit includes several improvements aimed at simplifying code, improving readability, and optimizing performance:

- Inline enum struct fields to reduce indirection and clutter.
- Rename structs to improve clarity and better reflect their purpose.
- Enable specific feature flags in dependencies for a more streamlined build.
- Eliminate unnecessary data allocations to optimize memory usage.
- Correct minor grammatical error in documentation.
- allocates Strings only when necessary with `uniffi` feature,
  otherwise, keeps LogRecord fileds as lifetime references.
This commit adds a CustomLogWriter class to the kotlin library
test, configuring the writer via the exposed node builder and tests
the ability to log to the custom writer destination.

[WIP]
- use proper method calls: setCusomLogger, onchainPayment
- use getter to retrieve list of log entries
@enigbe enigbe closed this Feb 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants