Closed jpotter closed 10 years ago
Hi!
Do you still get warnings if you use this pattern: /mnt/service/logs/**
? It's the recursive version.
Ahhhh. That makes so much more sense; wouldn't have thought of that. Thanks!
Hi Joakim,
Actually, we're still getting the warnings. Using "_" finds all files -- which includes directory entries. We can't use something like _/*.log because we're handling many different services with various log file extensions that are unknown to our psdash instance.
So, maybe a simple: if not os.path.isdir(log_file) self.add_available(log_file) in log.py would avoid this? That'll work for the most part (unless log_file is a symlink to a dir...)
-Jeff
Ah, good find. I'll look into it.
Fixed by bfbba02e09cd5a8885b9308b4ef37de9349e8de9. Thanks for reporting!
Thanks for the quick fix!
Just updated to the latest version (it's been a while! nice updates! Works on OS X now!), and seeing this:
WARNING | psdash.log | Could not read log file "/mnt/service/logs/graphite" ([Errno 21] Is a directory: u'/mnt/service/logs/graphite')
Our log files are nested, and log files come and go (rotated out), so I start psdash with "--log /mnt/service/logs/* --log /mnt/service/logs// --log /mnt/service/logs///*". This gets us three levels, quite nicely.
Can the warnings for dir entries be ignored? Or maybe as a feature request, adding a --recurssive-log-dir option might be generally useful?
Thanks! -Jeff