
Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net
Simple plasmoid similar to command-line "tail -f" command - tracking changes in files and notifying about new lines.
Main goal was to track /var/log/emerge.log on Gentoo linux, but it functions just as well for any other file.
this version is almost complete: basic functionality is already there - it tracks the changes and displays notifications.
tracking several files means creating several instances of this plasmoid.
There are other plasmoids that would track the output of shell command - this one was build for sheer simlicity and convenience.
9 years ago
1.0
- fixed some minor bugs
- tested on KDE-4.6.2 (Fedora-based)
1.0b4
- cleaned-up configuration screen
- added notification pooling to work around "KNotify spamming".
1.0b3
- added configuration option for KNotify message length
1.0b2
- forced data reload on startup. Now the state should be preserved fine between sessions.
1.0b1
- added configuration options and config preservation
1.0a3
- fixed spamming via KNotify. Now it tries to truly follow file and not dump contents of last 4K of file
1.0a2
- added exception handling for cases of missing /var/log/emerge.log (sorry to non-getnoo folks ;) )
9 years ago
1.0
- fixed some minor bugs
- tested on KDE-4.6.2 (Fedora-based)
1.0b4
- cleaned-up configuration screen
- added notification pooling to work around "KNotify spamming".
1.0b3
- added configuration option for KNotify message length
1.0b2
- forced data reload on startup. Now the state should be preserved fine between sessions.
1.0b1
- added configuration options and config preservation
1.0a3
- fixed spamming via KNotify. Now it tries to truly follow file and not dump contents of last 4K of file
1.0a2
- added exception handling for cases of missing /var/log/emerge.log (sorry to non-getnoo folks ;) )
rhsoftware
9 years ago
really a nice tool but it needs some improvements
after "> file" to reset it will no longer refresh in the current session and should be cleared too
some years ago i solved this by using "tail -n 10" to get the latest 10 lines and call this in a fixed interval
if file does not exist at session start (remote mount points - would also be solved by using "tail -n lines" in a fixed interval with supressing errors
Report
unknownSpirit
9 years ago
Depends on what you write to the file.
On my system (ubuntu with old kde) it works.
If you remove the file the plasmoid will stop. However, it won't continue if your observed data is restored. That's a bit annoying.
Report
rhsoftware
9 years ago
i think "tail -f" is not really relieable and should be replaced with "tail -n", this would not be a problem if the mount-point is even temorary not available
Report
xaccrocheur
9 years ago
That's too bad, because it's reaaly good.
Suggestions :
search for a word and color it
in config window :
string to search for <field> change color to <color menu> (simple, basic 8 colors)
Merge several logs together
in config window :
Log 1 <field + openfile button>
Log 2 <field + openfile button>
Log 3 <field + openfile button>
Separate : <radio button yes/no>
Separator character : <restricted text field>|<basic "-, _, # menu>
Thank you very much for your time/work
Report
dmakovey
9 years ago
Report
Wonko
9 years ago
1) Configurable font. I would like to make the font somewhat smaller.
2) An option to act like tail --follow=name. Tail -f normally follows the inode, so when the file is being renamed (e.g. by logrotate), the new file will not be monitored.
Report
dmakovey
9 years ago
Report
nowhereman158
10 years ago
Debian squeeze / KDE 4.4.5
Report
dmakovey
10 years ago
Report
Epimetheus11
9 years ago
Anyway, from the source code it's clear that the applet requires a TailFileName field in ~/.kde/share/config/plasma-desktop-appletsrc
So if others run into this they only have to configure the number of entries they want, then search the config file for TailSize and add the TailFileName entry there.
Report
dmakovey
9 years ago
Report
sblinux
11 years ago
plasmoidviewer tail.plasmoid
plasmoidviewer(19838)/plasma main: setting FormFactor to "planar"
plasmoidviewer(19838)/plasma main: setting Location to "floating"
plasmoidviewer(19838)/plasma main: setting containment to "null"
plasmoidviewer(19838)/plasma main: setting auth policy
plasmoidviewer(19838)/plasma main: just load applet
plasmoidviewer(19838)/plasma FullView::addApplet: adding applet "tail.plasmoid" in "null"
plasmoidviewer(19838)/libplasma Plasma::CoronaPrivate::addContainment: loading of containment "null" failed.
plasmoidviewer(19838)/kdecore (KSycoca) KSycocaPrivate::openDatabase: Trying to open ksycoca from "/var/tmp/kdecache-sbrown/ksycoca4"
plasmoidviewer(19838)/libplasma Plasma::AppletPrivate::init: Check your constructor! You probably want to be passing in a Service::Ptr or a QVariantList with a valid storageid as arg[0].
plasmoidviewer(19838)/libplasma Plasma::Applet::load: offers is empty for "tail.plasmoid"
plasmoidviewer(19838)/libplasma Plasma::ContainmentPrivate::addApplet: Applet "tail.plasmoid" could not be loaded.
plasmoidviewer(19838)/libplasma Plasma::AppletPrivate::init: Check your constructor! You probably want to be passing in a Service::Ptr or a QVariantList with a valid storageid as arg[0].
plasmoidviewer(19838)/libplasma Plasma::FrameSvg::resizeFrame: Invalid size QSizeF(0, 0)
Report
dmakovey
11 years ago
http://forum.kde.org/viewtopic.php?f=67&t=85368
Report
dmakovey
11 years ago
Report
mreloads
11 years ago
Traceback (most recent call last):
File "/usr/share/kde4/apps/plasma_scriptengine_python/pyappletscript.py", line 53, in init
self.pyapplet = self.module.main.CreateApplet(None)
File "/home/first/.kde/share/apps/plasma/plasmoids/tail/contents/code/main.py", line 171, in CreateApplet
return Tail(parent)
File "/home/first/.kde/share/apps/plasma/plasmoids/tail/contents/code/main.py", line 64, in __init__
self.follow=Follow('/var/log/emerge.log',size=10,lookback=14096)
File "/home/first/.kde/share/apps/plasma/plasmoids/tail/contents/code/main.py", line 16, in __init__
self.file=open(self.filename,'r')
IOError: [Errno 2] No such file or directory: '/var/log/emerge.log'
[first@MyComp ~]$ touch /var/log/emerge.log
touch: cannot touch `/var/log/emerge.log': Permission denied
[first@MyComp ~]$ su -c "touch /var/log/emerge.log"
[first@MyComp ~]$ su -c "chown -R first /var/log/emerge.log"
[first@MyComp ~]$ plasmoidviewer tail
[first@MyComp ~]$
In short, this plasmoid requires a file /var/log/emerge.log to be present in order to run at all. Creation of that file requires root privileges.
Also plasmoid name is a bit misleading because it can only display text files.
Report
dmakovey
11 years ago
although you could use command line "tail" to trail binary files I haven't come across such usage. most tail uses are around text files - thus the name for the applet :)
Report
mreloads
11 years ago
Report
dmakovey
11 years ago
http://kde-look.org/content/show.php/STDIN+Plasmoid?content=92309
but for my purposes I wanted just the "tail" part to keep it simle and tidy :)
Report
dmakovey
11 years ago
Report