nickna / Neighborly

An open-source vector database
MIT License
9 stars 2 forks source link

feat: Replace Console logging in VectorDatabase with ILogger #26

Closed hangy closed 4 weeks ago

hangy commented 1 month ago

๏ปฟ# ๐ŸŽ‰ Pull Request Template

๐Ÿ“ Description

Replaces current Console.WriteLine calls by using .NET's standard logging abstraction.

โœ… Checklist

Before submitting this pull request, please make sure you've completed the following:

๐Ÿ”— Related Issues

Contributes to #22.

๐Ÿ“ท Screenshots

N/A

๐Ÿ’ก Additional Notes

Mocks

I needed some mocks to validate that correct log messages and other properties. To do that, I added some manual Mocks in the Neighborly.Tests.Helpers namespace, because I didn't see any mocking library in use. Please let me know if you'd rather use some mocking library, or don't log messages to be tested in that level of detail.

Serilog/NLog

I didn't want to decide on a logging framework for you, but it should be easy enough to plugin in a different one later. Generally, I think it might be a good idea to also log to OTEL and provide some metrics.

nickna commented 4 weeks ago

Looks good. Thank you for contributing!