Skip to content

Allows for easily logging events. Simply give the event that occured as a string, then the name of whatever sent the event and you're done!

Notifications You must be signed in to change notification settings

Lexz-08/SharpLog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SharpLog

Description

Allows for easily logging events. Simply give the event that occured as a string, then the name of whatever sent the event and you're done!

How To Use

I used the current Date and Time(s) I had at the moment for these examples. Now the MessageBox.Show(LoggedEvent); is me assuming you have the System.Windows.Forms namespace referenced.

(Date W/ Time)

string LoggedEvent = Logger.LogEvent("Form1", "Opened");
MessageBox.Show(LoggedEvent);

// MessageBox Message: '[6/1/2021, 5:57:10] Form1: Opened'

(Date W/OUT Time)

string LoggedEvent = Logger.LogEvent("Form1", "Opened", default, false);
MessageBox.Show(LoggedEvent);

// MessageBox Message: '[6/1/2021] Form1: Opened'

(Time W/OUT Date)

string LoggedEvent = Logger.LogEvent("Form1", "Opened", false);
MessageBox.Show(LoggedEvent);

// MessageBox Message: '[5:57:10] Form1: Opened'

(No Date/Time)

string LoggedEvent = Logger.LogEvent("Form1", "Opened", false, false);
MessageBox.Show(LoggedEvent);

// MessageBox Message: 'Form1: Opened'

Download

SharpLog.dll

About

Allows for easily logging events. Simply give the event that occured as a string, then the name of whatever sent the event and you're done!

Topics

Resources

Stars

Watchers

Forks

Languages