Functional Logs-Cutting tool implemented by Java