Giter Site home page Giter Site logo

lognotify's Introduction

#lognotify... ... is log watcher for awesome wm.

It will show a naughty popup each time something changes in one of the predefined log files.

#REQUIREMENTS awesome for sure :)

linotify

$ luarocks install inotify

luasocket

$ luarocks install luasocket

bitop

$ luarocks install luabitop

One-Liner for archlinux:

$ yaourt -S lua-socket lua-bitop linotify-git

#SETUP

  • Make and install luainotify.

  • Clone lognotify into your configuration directory. (~/.config/awesome):

    cd $XDG_CONFIG_HOME/awesome && git clone git://github.com/Mic92/lognotify.git

    or rename init.lua to lognotify.lua and put into awesome's loadpath:

    wget --no-check-certificate https://github.com/Mic92/lognotify/blob/master/init.lua -O $XDG_CONFIG_HOME/awesome/lognotify.lua

#USAGE

  • Require the module in your rc.lua

local lognotify = require("lognotify")

  • Initialize and configure it. Here an example:
ilog = lognotify{
   logs = { mpd = { file = "/home/bob/.mpd/log", },
   	aptitude = { file = "/var/log/aptitude", },
   	-- Check, whether you have the permissions to read your log files!
   	-- You can fix this by configure syslog deamon in many case.
   	syslog    = { file = "/var/log/syslog", ignore = { "Changing fan level" },
   	},
   	awesome  = { file = "/home/bob/log/awesome",
   		ignore = {
   			"/var/lib/dpkg", -- aptwidget failure when aptitude running
   			"wicd", "wired profiles found", -- wicd junk
   			"seek to:", "Close unzip stream", -- gmpc junk
   			"^nolog"},
   		},
   -- Delay between checking in seconds. Default: 1
   interval = 1,
   -- Time in seconds after which popup expires. Set 0 for no timeout. Default: 0
   naughty_timeout = 15
}
  • run it:

ilog:start()

  • if you tired of it, you can stop it and start later at any time again

ilog:stop()

#THANKS

  • koniu - original author of code
  • dodo - port to luarocks's inotify and fixes related to logrotate

lognotify's People

Contributors

dodo avatar mic92 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

lognotify's Issues

stops sometimes

sometimes lognotify just stops working and i have to restart awesome to get it working again.

i came to the assumption that a logrotate might be a problem.
i'm using rsyslog on debian sid.

what do you think?

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.