TheSmokie 242 Posted August 8, 2019 Share Posted August 8, 2019 Hello, i got the idea from someone else and thought it would be a good idea to release the source code for people who wish to log there fightclass / plugins to be able to help find bugs faster and help people fix problems with there product. enjoy Class.cs using System; using System.IO; using robotManager.Helpful; public class Main : wManager.Plugin.IPlugin { public void Initialize() { Log("Hello, welcome to pornhub."); } public void Dispose() { } public void Settings() { } private void Log(String lines) { System.IO.Directory.CreateDirectory(@"Plugins\FileName\logs\"); string logpath = Path.Combine(Environment.CurrentDirectory, @"Plugins\FileName\logs\", "Logger" + DateTime.Now + ".txt"); try { System.IO.StreamWriter file = new System.IO.StreamWriter(logpath, true); file.WriteLine(lines + "\n"); file.Close(); } catch (Exception e) { Logging.Write("[Logger] Error logging" + e); } } } Kamogli 1 Link to comment https://wrobot.eu/forums/topic/11559-release-simple-log-format/ Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now