For Hurtworld console comand i write mini-plugin
This plugin void ServerConsoleComand and write his in console. I dont know how write logs-file create.Code:namespace Oxide.Plugins { //Начало [Info("ComandConsole", "i-593", 1.0)] [Description("Plugin for log console comand in console history")] class ComandConsole : HurtworldPlugin { void Init() { Puts("ComandConsole Init!"); //message for load plugin } void OnServerCommand(string command) { Puts(command); //message "comand" in console; } } } //Конец
Please his search in log-oxcide "ComandConsole" - and create log-comand-console-date
This plugin not write comand on chat-comand. ((((
In my log "oxcide_2017..."
Code:07:39 [Info] [ComandConsole] version
Logger
Moved
Total Downloads: 3,431 - First Release: Oct 22, 2014 - Last Update: Dec 12, 2017
- 5/5, 24 likes
-
please update logger it causes ALOT OF LAG 21235ms
and the lag is like 30 sec,s delay -
Wulf Community Admin
-
holy moly your are replying fast credit for that
but it worked fine before 3 weeks or so? -
Wulf Community Admin
-
im hosting on gameservers they provide with 4gb after i unloaded logger te server stopped crashing and being ram killed
it is because i have 70 plugins on my server -
Wulf Community Admin
-
okay thanks for the helping
-
Wulf,
It's Good. I have create Plugin for logs-file ChatCommand in HurtworldLast edited by a moderator: Apr 24, 2017 -
Great plugin, recently was seeing some lag showing up:
Code:Calling 'OnUserChat' on 'Logger v2.0.3' took 439ms Calling 'OnServerCommand' on 'Logger v2.0.3' took 1103ms
Logger.cs line 167
Code:void Log(string filename, string text) { LogToFile(filename, $"[{DateTime.Now}] {text}", this); if (logToConsole) Puts(text); }
Code:protected void LogToFile(string filename, string text, Plugin plugin, bool timeStamp = true) { var path = Path.Combine(Interface.Oxide.LogDirectory, plugin.Name); if (!Directory.Exists(path)) Directory.CreateDirectory(path); filename = $"{plugin.Name.ToLower()}_{filename.ToLower()}{(timeStamp ? $"-{DateTime.Now:yyyy-MM-dd}" : "")}.txt"; using (var writer = new StreamWriter(Path.Combine(path, Utility.CleanPath(filename)), true)) writer.WriteLine(text); }
Im curious if it would be faster to setup path, check directory and open StreamWriter all one time, vs every time.
Rapid Opening and Closing System.IO.StreamWriter in C#
In recent past I have used NLog, with async writes and flush and close at end.
Anyways, Just posted this all as something to think about, not sure if its an issue or not. -
Wulf Community Admin
-
Help. No support BetterChat. No logs all with 05/09/2017
Last edited by a moderator: May 27, 2017 -
Wulf Community Admin
-
-
Wulf Community Admin
-
Consegui corrigir todos os erros, exceto este:
Logger.cs (125,13): erro CS0103: O nome 'logToFile' não existe no contexto atual
{
LogToFile (filename, $ "[{DateTime.Now}] {text}", este);
If (logToConsole) Coloca (texto);
} -
Wulf Community Admin
-
Is there a way to get Logger to log "No Clip"?
-
Wulf Community Admin
-
Hurtworld chat command logs are not working. Where is the call OnUserCommand?
I do not see this possibility here: Oxide/HurtworldCore.cs at develop · OxideMod/Oxide · GitHub
I want to catch and possibly cancel Chat Command execution.