-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
in_tail plugin's mysterious behavior if use wildcard pattern in windows #919
Conversation
Without any tests, we cannot understand how/why this code fixes your problem :( |
One idea is changing separate configuration into *nix and windows versions. if Fluent.windows?
EX_CONFIG = %[
path test/plugin/*/%Y/%m/%Y%m%d-%H%M%S.log,test\plugin\data\log\**\*.log # use \ for * path
]
else
EX_CONFIG = # keep old configuration
end After applied above change, we check patch is good on AppVeyor test. |
BTW, expand_path expands relative path to absolute path so other tests are failed. |
I confirmed |
This doesn't work if you have a file which includes glob meta characters.
|
Verbosed other way is adding |
If adding fixed_string_path or something to specify paths which doesn't include wildcard, users can reduce glob call and doesn't need escaping glob meta characters also on Unix. |
Thank you for your advice. |
From nurse comment, we can't accept current patch so we should find another way. |
I created an issue for this problem #1138, so let me close this. |
in_tail
plugin allows to write wildcard pattern inpath
option.If we use backslash path separation and wildcard pattern simultaneously in windows, the plugin doesn't work.
If we use backslash path separation and don't use wildcard pattern in windows, the plugin works.
This PR enables to be used backslash and wildcard simultaneously in windows.
Although I did some tests in my hand manually, I was not able to write tests in code because of lack of my knowledge of ruby.