Giter Site home page Giter Site logo

watchdog's Introduction

watchdog HitCount

A filesystem watchdog. It watches events on files and directories on a given portion of a filesystem. Events can happen on files or directories; everything which isn't a directory is considered as a file (alias and/or link too). Recordered events are classified as follows:

  • Created: a new item has been created in the watched portion of the filesystem.
  • Moved: an item has been moved from or to a watched portion of the filesystem.
  • Modified: an item in the watched portion of the filesystem has been edited.
  • Deleted: an item in the watched portion of the filesystem has been removed.

How does it works?

(c) 2019 Giovanni Lombardo mailto://[email protected]
wd.exe version 1.0.0

usage: wd.exe [-h] [-i IGNORED [IGNORED ...]] [-g] [-p] [-ci CI] [-ls LS]
              [-ln LN]
              location log

It records events on a given portion of filesystem.

positional arguments:
  location              The portion of the filesystem to watch.
  log                   The log file that will contain event entries.

optional arguments:
  -h, --help            show this help message and exit
  -i IGNORED [IGNORED ...], --ignored IGNORED [IGNORED ...]
                        Pattern of items to ignore.
  -g, --git             When given it performs commit on the log folder.
  -p, --push            When given it performs pushes on the log folder.
  -ci CI, --commit-interval CI
                        When given it defines after how much time commits to
                        logs are performed; defaults to 60 (seconds).
  -ls LS, --log-size LS
                        When given defines the maximum size of each log file;
                        defaults to 30 (MB).
  -ln LN, --log-number LN
                        When given defines the maximum number of log files of
                        the given size; defaults to 10.

Note

When the specified log file is actually stored into the watched portion of the filesystem every change to it will be reported as an event in the log file, thus generating a huge number of unuseful events. In such cases, to avoid this circumstance wd should be executed with the -i option with at least one (regex) pattern matching the name of the log file. Take a look at the following example:

wd.exe C:\ C:\Users\Jhon\Logs\wd.log -i "wd\.log$"
                                     -------------

The dot (.) in the regexp language has special meaning, so it must be escaped in order for it to be matched literally. The dollar sign (-$) at the end of the regex means that the matching string must end there.

Download

Contributing contributions welcome

Powered by

Python

watchdog's People

Contributors

giovalomba avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.