Comments (2)
That's a good question. No I think it's honestly just a design oversight that I didn't log to an ILogger - probably because I wasn't sure if it would be flushed in time when the application exits less-than-gracefully. I'm still not sure it will for all implementations
If you want, I'd be happy to accept a PR that logs to both the ILogger and the Console interface.
from betterhostedservices.
I do think that you should use the built-in ILogger. By default, when you create a new project, this ILogger output to console, thus the user should still be able to see it if they look at the console output, or the docker output. Given that the .net host also use the ILogger abstraction to writer logs, I do think it's used by everyone.
Those like me that customized the ILogger to output elsewhere will also able to see those messages in their log file or in their remote logging service. I don't think there much of a user base for those that disable all logging of the microsoft ILogger and only output to console using a different logger.
I've created a pull request, feel free to edit it if you wish to have the console back.
#23
from betterhostedservices.
Related Issues (18)
- Badges don't work HOT 1
- Fixed failed symbol publishing HOT 2
- Nuget package has build number HOT 1
- End process *less* gracefully HOT 5
- Looks like I can use it in my .net generic host HOT 1
- Make CriticalBackgroundService.OnError() abstract HOT 5
- Make ensuring TPeriodicTask registered more graceful HOT 1
- Use factory for instantiating TPeriodicTask HOT 1
- Fix CA2254 when logging HOT 1
- Return IServiceCollection from IServiceCollectionExtensions HOT 2
- Re-enable code style analyzers
- Packages on release instead push
- Target the library to .NET 5? HOT 1
- Rewrite tests to remove WebHost context
- Re-enable tests for Windows and MacOS HOT 1
- Readme and AddHostedServiceAsSingleton
- Change .pfx file HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from betterhostedservices.