[FEATURE REQUEST]: Allow injection of custom LoggerService
See original GitHub issueIt’s not possible to redirect all logging to the applications own logging pipeline currently as both LoggerServiceFactory
and ILoggerService
are internal.
I would like to inject my own logging service (either seq or Application Insights depending on environment) and have all logs consolidated.
It seems log4net is suppoerted via config file however I have other correlation information that I need to add which I cannot see how to accomplish.
Is this possible or is there another way to achieve this?
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (10 by maintainers)
Top Results From Across the Web
Custom Logger service not working as expected · Issue #507
We need to use our custom injectable logger. Environment. Nest version: 4.6.5 For Tooling issues: - Node version: v8.10.0 - Platform: Linux ...
Read more >Logger | NestJS - A progressive Node.js framework
To enable dependency injection for your custom logger, create a class that implements LoggerService and register that class as a provider in ...
Read more >c# - Dependency injection and named loggers
I'm using Ninject to resolve the current class name for the logger instance like this: kernel.Bind<ILogger>().To<NLogLogger>() .
Read more >NestJS Custom Logger With RabbitMQ Injection
To enable dependency injection for my custom logger, I created a class that implements LoggerService and registered that class as a provider in...
Read more >How to Use NestJS Logger
It is possible to customize it but at that point let's just import it as is. You can import the logger service with:...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
serilog
should be good. Do you want to work on this? If so, I can break down work items for you. Thanks!We could expose
LoggerServiceFactory
andILoggerService
as public, but let me double-confirm. Meanwhile, you can use https://github.com/aelij/IgnoresAccessChecksToGenerator to access internal classes if you are blocked.