Skip to content

Commit 79a209e

Browse files
committed
Enhance logging output in TSafe for improved readability and added developer information
1 parent 363099a commit 79a209e

File tree

1 file changed

+24
-24
lines changed

1 file changed

+24
-24
lines changed

TSafe/TSafe.cs

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using SDG.Unturned;
1+
using System;
2+
using SDG.Unturned;
23
using System.Collections.Generic;
34
using System.Threading.Tasks;
45
using Tavstal.TLibrary;
@@ -35,28 +36,27 @@ public override void OnLoad()
3536
// Attach player related events
3637
PlayerEventHandler.AttachEvents();
3738

38-
Logger.LogWarning("████████╗███████╗ █████╗ ███████╗███████╗");
39-
Logger.LogWarning("╚══██╔══╝██╔════╝██╔══██╗██╔════╝██╔════╝");
40-
Logger.LogWarning(" ██║ ███████╗███████║█████╗ █████╗ ");
41-
Logger.LogWarning(" ██║ ╚════██║██╔══██║██╔══╝ ██╔══╝ ");
42-
Logger.LogWarning(" ██║ ███████║██║ ██║██║ ███████╗");
43-
Logger.LogWarning(" ╚═╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚══════╝");
44-
Logger.Log("#########################################");
45-
Logger.Log("# Thanks for using my plugin");
46-
Logger.Log("# Plugin Created By Tavstal");
47-
Logger.Log("# Discord: Tavstal");
48-
Logger.Log("# Website: https://redstoneplugins.com");
49-
// Please do not remove this region and its code, because the license require credits to the author.
50-
#region Credits to Tavstal
51-
Logger.Log("#########################################");
52-
Logger.Log($"# This plugin uses TLibrary.");
53-
Logger.Log($"# TLibrary Created By: Tavstal");
54-
Logger.Log($"# Github: https://github.com/TavstalDev/TLibrary/tree/master");
55-
#endregion
56-
Logger.Log("#########################################");
57-
Logger.Log($"# Build Version: {Version}");
58-
Logger.Log($"# Build Date: {BuildDate}");
59-
Logger.Log("#########################################");
39+
Logger.Log("████████╗███████╗ █████╗ ███████╗███████╗", ConsoleColor.Cyan, prefix: null);
40+
Logger.Log("╚══██╔══╝██╔════╝██╔══██╗██╔════╝██╔════╝", ConsoleColor.Cyan, prefix: null);
41+
Logger.Log(" ██║ ███████╗███████║█████╗ █████╗ ", ConsoleColor.Cyan, prefix: null);
42+
Logger.Log(" ██║ ╚════██║██╔══██║██╔══╝ ██╔══╝ ", ConsoleColor.Cyan, prefix: null);
43+
Logger.Log(" ██║ ███████║██║ ██║██║ ███████╗", ConsoleColor.Cyan, prefix: null);
44+
Logger.Log(" ╚═╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚══════╝", ConsoleColor.Cyan, prefix: null);
45+
Logger.Log("#########################################", prefix: null);
46+
Logger.Log("# Thanks for using this plugin! #", prefix: null);
47+
Logger.Log("#########################################", prefix: null);
48+
Logger.Log("# Developed By: Tavstal", prefix: null);
49+
Logger.Log("# Discord: @Tavstal", prefix: null);
50+
Logger.Log("# Website: https://redstoneplugins.com", prefix: null);
51+
Logger.Log("# My GitHub: https://tavstaldev.github.io", prefix: null);
52+
Logger.Log("#########################################", prefix: null);
53+
Logger.Log($"# Plugin Version: {Version}", prefix: null);
54+
Logger.Log($"# Build Date: {BuildDate}", prefix: null);
55+
Logger.Log($"# TLibrary Version: {LibraryVersion}", prefix: null);
56+
Logger.Log("#########################################", prefix: null);
57+
Logger.Log("# Found an issue or have a suggestion?", prefix: null);
58+
Logger.Log("# Report it here: https://github.com/TavstalDev/TSafe/issues", prefix: null);
59+
Logger.Log("#########################################", prefix: null);
6060

6161
DatabaseManager = new DatabaseManager(this, Config);
6262
if (IsConnectionAuthFailed)
@@ -101,7 +101,7 @@ private void Event_OnPluginsLoaded(int i)
101101
{
102102
if (IsConnectionAuthFailed)
103103
{
104-
Logger.LogWarning($"# Unloading {GetPluginName()} due to database authentication error.");
104+
Logger.Warning($"# Unloading {GetPluginName()} due to database authentication error.");
105105
this.UnloadPlugin();
106106
}
107107
}

0 commit comments

Comments
 (0)