Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The order of notification? #80

Open
leo-987 opened this issue Apr 16, 2016 · 7 comments
Open

The order of notification? #80

leo-987 opened this issue Apr 16, 2016 · 7 comments

Comments

@leo-987
Copy link

leo-987 commented Apr 16, 2016

Hello, this tool is very convenient. But I want to know the order of notification if there are many file in the same directory.

@guyboertje
Copy link
Contributor

@Oyld - Are you using this library/gem outside of Logstash?

@guyboertje
Copy link
Contributor

@Oyld - Ordering/Sorting of the files returned by the glob pattern is a planned feature.
I have done some preliminary work on this.

What kind of order/sort would you want to apply?

I have these in mind:

  • path
  • modified_at
  • smallest
  • biggest
  • least_bytes_read
  • most_bytes_read

Would you want to combine them? e.g. most_bytes_read then path

@guyboertje
Copy link
Contributor

Duplicate of #77

@leo-987
Copy link
Author

leo-987 commented Apr 18, 2016

Yes, I want use it outside of Logstash.
I need sort by creation time, since I want to collect log files.

@guyboertje
Copy link
Contributor

@Oyld - unfortunately many *nix file systems do not record a creation_time for a file.
So this would not be a cross-platform possibility.

See this Stackoverflow answer

@guyboertje
Copy link
Contributor

@Oyld - I'm curious, did you write some code that uses filewatch or are you using another library that uses it?
If you own code, do you use the observer or yielding interface?
If another, which one?

@leo-987
Copy link
Author

leo-987 commented Apr 19, 2016

Oh, I understand. Actualy I need mtime, not creation time.
Thank you for your pointer.
I want to write a tool for log collection like logstash, but it haven't done yet.
:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants