NoPlog
El weblog de NoP
lunes, mayo 06, 2013
Filtering messages in rsyslog
Each time I open a new chromium-browser tab, I get messages like this in /var/log/syslog:
May 6 09:15:37 compiler kernel: [4742643.809674] type=1701 audit(1367824537.257:40179): auid=4294967295 uid=1000 gid=1000 ses=4294967295 pid=433 comm="chromium-browse" reason="seccomp" sig=0 syscall=2 compat=0 ip=0x7f3de13f86c0 code=0x50002
This kind of continuous log writing is annoying and useless in my "desktop" system, even worse with an SSD disk, so I started looking how to filter rsyslog messages based in text strings.
Thanks to Javier Vela, I finally added the following to my /etc/rsyslog.d/50-default.conf:
#### Begin - Remove chromium-browser messages:
if ($syslogfacility-text == 'kern') and \
( \
($msg contains 'chromium-browse') or \
($msg contains 'Chrome_') or \
($msg contains 'callbacks suppressed') \
) \
then ~
#### End
auth,authpriv.* /var/log/auth.log
-/var/log/syslog
*.*;auth,authpriv.none -/var/log/syslog
kern.* -/var/log/kern.log
mail.* -/var/log/mail.log
After an service rsyslog restart or /etc/init.d/rsyslog restart , the message will not appear again.
viernes, abril 05, 2013
Autoreload external code changes in Eclipse
Interesante, para poder usar "git" manualmente en Eclipse sin el plugin de Egit:
----------------------------------------------------------------
http://veerasundar.com/blog/2012/04/how-to-auto-reload-external-code-changes-in-eclipse-project/
I have started using Sublime text as my preferred code editor (for JS, CSS, Coffee). But, I still rely on Eclipse for writing Java code because it auto-imports Java packages and auto suggests variables and method names from my custom class files.
Working on multiple editors throws in another problem: whenever I make a change in some file outside of Eclipse, the IDE does not silently reload. It shows a blank page saying 'The resource is out of sync. Press F5 to reload'. The message started annoying me soon as I had to switch back and forth often.
It is not just for the multiple editors. Even when I do a git pull, the resources go out of sync.
Then, I found a workaround for this. Eclipse provides a built-in option that auto reloads a resource if its out f sync. Here's how you can enable it.
Go to Window -> Preferences -> General -> Workspace and check the option 'Refresh using native hooks or polling'.
So, the next time when you try to open a out of sync file, the IDE will sync it for you (thus saving you a keystroke, one at a time ).
----------------------------------------------------------------
El autor del mensaje original no lo comenta, pero también es necesario activar la opción Refresh on Access.
Suscribirse a:
Entradas (Atom)