format("Y-m-d").".log"; } private static function buildLogPath($machineIp, $shardType) { return Gatherer::buildLogFileLocation($shardType).Gatherer::buildLogFileName($machineIp); } private static function buildLogEntry($text) { $date = new \DateTime(); return $date->format("h:i:s")." \n"; } static function logEntry($shardType, $machineIp, $entry) { // ShardType check if ($shardType !== ShardType::Server) { $shardType = ShardType::Client; } $path = Gatherer::buildLogPath($machineIp, $shardType); file_put_contents($path, Gatherer::buildLogEntry($entry), FILE_APPEND); } } // EOF