FrPSUG / LogManagement

PowerShell module to manage logs
8 stars 5 forks source link

Choice of the output type of the logs #9

Open LaurentLienhard opened 5 years ago

LaurentLienhard commented 5 years ago

Have the choice of the destination of the logs:

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

LaurentLienhard commented 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

LxLeChat commented 5 years ago

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] 
omiossec commented 5 years ago

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

omiossec commented 5 years ago

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.