Stephanevg / PSHTML

Cross platform Powershell module to generate HTML markup language
https://pshtml.readthedocs.io/en/latest/
Other
165 stars 43 forks source link

decouple logger object from the configurationdocument object #301

Open Stephanevg opened 1 year ago

Stephanevg commented 1 year ago

Currently, the logger object is build using a property that is generated via the configurationdocument object.

Since the configurationdocument class also use write-verbose statement, when they are called during the load of the module, the module actually throws an error saying that the path provided to write-pshtmllog is empty. That is because the configurationDocument is not completley created yet.

IT would be better to decouple the logger object from any setting file, and simply make sure that the logger object runs first when the module gets loaded.