Improved logging closes #180
All checks were successful
All checks were successful
This commit is contained in:
@@ -42,10 +42,10 @@ class Application(ApplicationABC):
|
||||
|
||||
if self._configuration.environment.application_name != "":
|
||||
self._logger.header(f"{self._configuration.environment.application_name}:")
|
||||
self._logger.debug(__name__, f"Args: {self._configuration.additional_arguments}")
|
||||
self._logger.debug(__name__, f"Host: {self._configuration.environment.host_name}")
|
||||
self._logger.debug(__name__, f"Environment: {self._configuration.environment.environment_name}")
|
||||
self._logger.debug(__name__, f"Customer: {self._configuration.environment.customer}")
|
||||
self._logger.debug(f"Args: {self._configuration.additional_arguments}")
|
||||
self._logger.debug(f"Host: {self._configuration.environment.host_name}")
|
||||
self._logger.debug(f"Environment: {self._configuration.environment.environment_name}")
|
||||
self._logger.debug(f"Customer: {self._configuration.environment.customer}")
|
||||
Console.write_line(List(int, range(0, 10)).select(lambda x: f"x={x}").to_list())
|
||||
Console.spinner("Test", self._wait, 2, spinner_foreground_color="red")
|
||||
test: TestService = self._services.get_service(TestService)
|
||||
@@ -69,4 +69,4 @@ class Application(ApplicationABC):
|
||||
self._configuration.add_json_file(f"appsettings.{self._environment.host_name}.json", optional=True)
|
||||
test_settings1 = self._configuration.get_configuration(TestSettings)
|
||||
Console.write_line(test_settings1.value)
|
||||
# self.test_send_mail()
|
||||
# self.test_send_mail()
|
||||
@@ -19,12 +19,8 @@ class Startup(StartupABC):
|
||||
config.add_json_file(f"appsettings.{config.environment.environment_name}.json")
|
||||
config.add_json_file(f"appsettings.{config.environment.host_name}.json", optional=True)
|
||||
|
||||
return config
|
||||
|
||||
def configure_services(self, services: ServiceCollectionABC, env: ApplicationEnvironmentABC) -> ServiceProviderABC:
|
||||
services.add_singleton(LoggerABC, Logger)
|
||||
services.add_singleton(EMailClientABC, EMailClient)
|
||||
services.add_logging()
|
||||
services.add_mail()
|
||||
services.add_transient(IPAddressPipe)
|
||||
services.add_singleton(TestService)
|
||||
|
||||
return services.build_service_provider()
|
||||
|
||||
Reference in New Issue
Block a user