logging
MyGuardDog logs a large number and variety of events that occur on a server. Every five minutes, every time the world saves, and every time the server stops, myGuardDog saves all the events to that occur on the server in three different places.
Events are logged in complete sentences in a .txt format. When the inspector is used and events are displayed, the information about the event appears to the player using the inspector in the chat in the exact format in which it was saved in the logs.This is the general format of any given event on a server:
On [date] at [time], [cause] [action] [object(s)] at ([x], [y], [z]) in "[world]" (while in [Creative/Survival] Mode). ([rolled back])
Note: While the coordinates in parentheses are always present, the other two parenthetical sections are optional additions to the save line.
Inside the myGuardDog plugin data folder, it generates three folders in which it stores the log files. The first of these folders, "by cause", contains a number of log files that each contain events that have the same cause. For example, all the events that have happened on a server caused by "a creeper" might be contained in a log file called "a creeper.txt". If one of these log files contains over 250,000 events, it splits and numbers the log files with the same causes (e.g. "a creeper.txt">>"a creeper (1).txt" and "a creeper (2).txt". This cause-based organization makes it easier for the plugin to find and collect events for a roll back in which a causes (or causes) are specified. Since most roll backs will likely be used to undo griefing, a cause will often be specified for the roll back. For example, you might roll back everything that "DatGr13fer" did on your server after you found him/her guilty of griefing. Instead of having to search through all of the logs and capture all of the events caused by DatGr13fer, myGuardDog can simply gather all of the events from the "DatGr13fer.txt" file in the cause logs folder.
In the second folder, "by position", myGuardDog saves the server's events into log files based on the location in which the event occurred. Each log file contains all of the events that have occurred at the specified x-coordinate in a given world. For example, all the events that occurred at the location (3000, [any y-coordinate], [any z-coordinate]) in "world" can be found in the file "x = 3000 world.txt". This position-oriented organization is useful for the inspector. When the inspector is in use, myGuardDog can very quickly find all the events that happened at a given location using the position logs.
In the third folder, "chronologically", you will find logs that contain up to 250,000 events each stored in a simple chronological order. Each log file's name tells you what time span that file covers. For example, a log file called "5'33'57 3-12-2012 - 14'05'22 6-8-2012" contains all of the events that occurred on the server between 5:33:37 (a.m.) on March 12, 2012 and 14:05:22 (or 2:05:22p.m.) on June 8, 2012. The chronological filing system represents the simplest and most concise way to log events. The purpose of this time-oriented organization is to allow myGuardDog to easily compile all the events on the server without looking through large numbers of files and to allow server admins like you to easily read the logs and find events manually if it ever becomes necessary.
Comments