Skip to content

Commit

Permalink
Fix log filter
Browse files Browse the repository at this point in the history
  • Loading branch information
RblSb committed Dec 31, 2023
1 parent 7b2ca47 commit 0d1fd0f
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 10 deletions.
1 change: 1 addition & 0 deletions build-client.hxml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
--class-path src
--main client.Main
-D analyzer-optimize
-w -WDeprecatedEnumAbstract
--dce full
--js res/client.js
1 change: 1 addition & 0 deletions build-server.hxml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
--class-path src
--main server.Main
-D analyzer-optimize
-w -WDeprecatedEnumAbstract
--dce full
--js build/server.js
25 changes: 17 additions & 8 deletions build/server.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion res/client.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion src/server/Logger.hx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ class Logger {
}

function removeOldestLog(folder:String):Void {
final names = FileSystem.readDirectory(folder);
final names = FileSystem.readDirectory(folder).filter(name -> {
if (FileSystem.isDirectory('$folder/$name')) return false;
if (name.startsWith(".")) return false;
return name.endsWith(".json");
});
if (names.count(item -> matchFileFormat.match(item)) < maxCount) return;
var minDate = 0.0;
var fileName:String = null;
Expand Down

0 comments on commit 0d1fd0f

Please sign in to comment.