LGTM, thanks

On Fri, Dec 20, 2013 at 2:41 PM, Klaus Aehlig <[email protected]> wrote:

> At debug level, not only log that an inotify triggered,
> but also log the actual event.
>
> Signed-off-by: Klaus Aehlig <[email protected]>
> ---
>  src/Ganeti/Utils.hs | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/src/Ganeti/Utils.hs b/src/Ganeti/Utils.hs
> index b197f1d..e008fa1 100644
> --- a/src/Ganeti/Utils.hs
> +++ b/src/Ganeti/Utils.hs
> @@ -617,8 +617,9 @@ watchFile fpath timeout old read_fn = do
>    fstat <- getFStatSafe fpath
>    ref <- newIORef fstat
>    inotify <- initINotify
> -  _ <- addWatch inotify [Modify, Delete] fpath . const $ do
> -    logDebug $ "Notified of change in " ++ fpath
> +  _ <- addWatch inotify [Modify, Delete] fpath $ \ e -> do
> +    logDebug $ "Notified of change in " ++ fpath
> +                 ++ "; event: " ++ show e
>      fstat' <- getFStatSafe fpath
>      writeIORef ref fstat'
>    newval <- read_fn
> --
> 1.8.5.1
>
>


-- 
-- 
Helga Velroyen | Software Engineer | [email protected] |

Google Germany GmbH
Dienerstr. 12
80331 München

Registergericht und -nummer: Hamburg, HRB 86891
Sitz der Gesellschaft: Hamburg
Geschäftsführer: Graham Law, Christine Elizabeth Flores

Reply via email to