Open LaurentLienhard opened 5 years ago
For exemple Log -Destination EVENT -Journal SYSTEM -Type WARN -Message "my message" -Source AD Log -Destination FILE -FileType LOG -Type WARM -Message "my message" -Source AD -Timestamp
we can implement a validation with a default value. Validate values could be xml,json,csv with maybe csv by default.
-OutputType [xml/Json/Csv]
We may have to change the Log object. we should manage polymorphism to use WriteMessage it can be ad-hoc polymorphism where we can just surcharge the method based on the input or use inclusive polymorphism where Log is a generic log object and inherence
My proposition
Create a superclass log and several inherited class
This way we can handle the complexity of these different formats and we open the way to add more format later.
Have the choice of the destination of the logs:
event in eventviewer
file
if event in eventwiever : possibility to use an existing log or to create a specific one for the application if file : possibility to choice format .log,.txt