maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   View logs on n900? (https://talk.maemo.org/showthread.php?t=50401)

atnnn 2010-04-18 22:32

View logs on n900?
 
With the sdk, many debug messages are visible in my terminal:

Code:

hildon-input-method[4587]: GLIB WARNING ** default - Replacing for 1 2
hildon-input-method[4587]: GLIB DEBUG default - User does not have a word frequency file, loading system file
hildon-input-method[4587]: GLIB WARNING ** default - Failed to open system word frequency file '/usr/share/cellwriter/wordfreq' for reading: No such file or directory

My input plugin runs fine in the SDK but not on my n900, I am looking for a good way to debug it.

Does anyone know where to get (or activate) the hildon-input-method logs?

How about the logs for the other applications? /var/log is empty and ~/.xsession-errors doesn't exist.

Thanks

danielwilms 2010-04-19 08:02

Re: View logs on n900?
 
Hi,

this page should help you. You have to install and start, syslogd / klogd, as described in the wiki-page.

Daniel

ZogG 2010-04-19 08:12

Re: View logs on n900?
 
also it's not that help but u can check dmesg from terminal or run programs from terminal to check for errors

qwerty12 2010-04-19 09:27

Re: View logs on n900?
 
Quote:

Originally Posted by ZogG (Post 617279)
also it's not that help but u can check dmesg from terminal or run programs from terminal to check for errors

The GLog log handler in Maemo 5 is set to output messages to the syslog, as danielwilms mentioned. Of course, any messages printed using g_warning (), g_debug (), etc. will be handled using GLog and sent to the syslog. A useful trick for applications that you can't run from the terminal directly, but rather annoying when you are able to do so... When I'm able to do so, g_printerr () FTW.

Oh, if you are able to insert gtk-parasite into your application (GTK_MODULES), it will cause all messages to be printed on stderr

maemo.it 2010-12-17 17:05

Re: View logs on n900?
 
to solve problem, as wrote in the wiki, of full /rootfs partition from syslog, can I move /var/log directory to Mydocs and create a symlink to it?

sutaburosu 2010-12-17 18:23

Re: View logs on n900?
 
Quote:

Originally Posted by maemo.it (Post 898836)
to solve problem, as wrote in the wiki, of full /rootfs partition from syslog, can I move /var/log directory to Mydocs and create a symlink to it?

I'm not sure, but I doubt it as syslogd almost certainly starts before MyDocs is mounted.

maemo.it 2010-12-17 20:14

Re: View logs on n900?
 
Quote:

Originally Posted by sutaburosu (Post 898887)
I'm not sure, but I doubt it as syslogd almost certainly starts before MyDocs is mounted.

Can I set a time-delay (eg.start syslogd after xx minutes after boot...) or condition (like an: if Mydocs is mounted then start syslogd)?

sutaburosu 2010-12-17 20:20

Re: View logs on n900?
 
Being a Gentoo and openrc user I don't know enough about the Debian/Maemo sysvinit boot sequence to answer this.
If keeping historical syslog output is important to you, I would use cron to schedule compressed backups to MyDocs to minimise rootfs space usage.

maemo.it 2010-12-17 21:12

Re: View logs on n900?
 
Quote:

Originally Posted by sutaburosu (Post 898969)
Being a Gentoo and openrc user I don't know enough about the Debian/Maemo sysvinit boot sequence to answer this.
If keeping historical syslog output is important to you, I would use cron to schedule compressed backups to MyDocs to minimise rootfs space usage.

Do you mean: periodically automatically a script takes syslog files from /var/log, compress and move its to Mydocs?
Great idea! ;)
I suppose this script should be like this:
in crontab:
Code:

0 14 1* * mv /var/log/syslog(.txt? I don't remember) /home/user/Mydocs/syslogsarchive
right? :)

maemo.it 2010-12-24 21:59

Re: View logs on n900?
 
hi guys, I had an idea.

I made a script: delete_syslog_script
Code:

#!/bin/sh
cat /dev/null > /var/log/syslog

I gave right permissions to my script:
Code:

chown root /home/user/delete_syslog_script
chmod 4755 /home/user/delete_syslog_script

and I installed fcron.
then I set in fcrontab -e:
Code:

!nolog(true)

22 19 * * 0-6 /home/user/delete_syslog_script

but syslog doesn't empty
any idea?
:confused:


All times are GMT. The time now is 16:30.

vBulletin® Version 3.8.8