Difference between revisions of "System Log"

From The iPhone Wiki
Jump to: navigation, search
(SBSettings Toggle)
(rewording)
Line 1: Line 1:
 
==bgm's trick for enabling system log==
 
==bgm's trick for enabling system log==
  +
# In the shell, do: echo "*.* /var/log/syslog" > /etc/syslog.conf
 
  +
# Add the following tags to /System/Library/LaunchDaemons/com.apple.syslogd.plist after the tag <string>/usr/sbin/syslogd</string>
1. In the shell, do: echo "*.* /var/log/syslog" > /etc/syslog.conf
 
 
2. Add the following tags to /System/Library/LaunchDaemons/com.apple.syslogd.plist after the tag <string>/usr/sbin/syslogd</string>
 
 
 
<string>-bsd_out</string>
 
<string>-bsd_out</string>
 
<string>1</string>
 
<string>1</string>
  +
This will tell the Daemon Launcher to call /usr/sbin/syslogd -bsd_out 1, and we have configured it to write all messages to [[:/var/log/syslog]]
  +
# "reboot & enjoy your kernel and other messages" (bgm)
   
  +
== Note ==
This will tell the Daemon Launcher to call /usr/sbin/syslogd -bsd_out 1, and we have configured it to write all messages to /var/log/syslog
 
 
3. "reboot & enjoy your kernel and other messages" (bgm)
 
 
==Note==
 
 
The syslog will grow very big quite quickly, but the folder /var/log/syslog is on the data partition (music, etc).<br>
 
The syslog will grow very big quite quickly, but the folder /var/log/syslog is on the data partition (music, etc).<br>
 
If you keep your device full of music, be careful you don't fill the partition. Unix systems tend to break when they
 
If you keep your device full of music, be careful you don't fill the partition. Unix systems tend to break when they
 
cant write to the syslog. Keep an eye on it or employ some log rotation.
 
cant write to the syslog. Keep an eye on it or employ some log rotation.
   
To disable:
+
To disable, enter [[Terminal.app]] and run:
  +
rm /var/log/syslog;
In a shell, do:
 
  +
This will delete (<tt>rm</tt>) the file and create a [[:/dev/null]]. (<tt>mknod *** c 3 2</tt>)
 
rm /var/log/syslog; mknod /var/log/syslog c 3 2
+
mknod /var/log/syslog c 3 2
This will turn /var/log/syslog into a /dev/null
 
   
To reenable:
+
To reenable, enter [[Terminal.app]] and run:
  +
rm /var/log/syslog
In a shell, do:
 
rm /var/log/syslog; touch /var/log/syslog
+
touch /var/log/syslog
   
This will remove the /dev/null and make a blank regular file
+
This will delete (<tt>rm</tt>) the file and and make a blank regular file. (<tt>touch</tt>)
   
==SBSettings Toggle==
+
== SBSettings Toggle ==
An SBSettings [http://apt.thebigboss.org/onepackage.php?bundleid=sbsettingssyslogd&db= toggle] for enabling/disabling syslog is available at BigBoss' Cydia repository.
+
An SBSettings [http://apt.thebigboss.org/onepackage.php?bundleid=sbsettingssyslogd toggle] for enabling/disabling syslog is available at BigBoss' Cydia repository. The <tt>syslog &gt; /var/log/syslog</tt> package from [[User:Saurik|saurik]]'s repo is not a dependency and you must manually install it also.
   
=Reference=
+
== Reference ==
http://code.google.com/p/iphone-elite/wiki/IphoneSyslogd<br>
+
http://code.google.com/p/iphone-elite/wiki/IphoneSyslogd<br />
 
(full history: http://code.google.com/p/iphone-elite/source/list?path=/wiki/IphoneSyslogd.wiki&start=398)
 
(full history: http://code.google.com/p/iphone-elite/source/list?path=/wiki/IphoneSyslogd.wiki&start=398)

Revision as of 15:26, 8 July 2011

bgm's trick for enabling system log

  1. In the shell, do: echo "*.* /var/log/syslog" > /etc/syslog.conf
  2. Add the following tags to /System/Library/LaunchDaemons/com.apple.syslogd.plist after the tag <string>/usr/sbin/syslogd</string>
<string>-bsd_out</string>
<string>1</string>

This will tell the Daemon Launcher to call /usr/sbin/syslogd -bsd_out 1, and we have configured it to write all messages to /var/log/syslog

  1. "reboot & enjoy your kernel and other messages" (bgm)

Note

The syslog will grow very big quite quickly, but the folder /var/log/syslog is on the data partition (music, etc).
If you keep your device full of music, be careful you don't fill the partition. Unix systems tend to break when they cant write to the syslog. Keep an eye on it or employ some log rotation.

To disable, enter Terminal.app and run:

rm /var/log/syslog;
mknod /var/log/syslog c 3 2

This will delete (rm) the file and create a /dev/null. (mknod *** c 3 2)

To reenable, enter Terminal.app and run:

rm /var/log/syslog
touch /var/log/syslog

This will delete (rm) the file and and make a blank regular file. (touch)

SBSettings Toggle

An SBSettings toggle for enabling/disabling syslog is available at BigBoss' Cydia repository. The syslog > /var/log/syslog package from saurik's repo is not a dependency and you must manually install it also.

Reference

http://code.google.com/p/iphone-elite/wiki/IphoneSyslogd
(full history: http://code.google.com/p/iphone-elite/source/list?path=/wiki/IphoneSyslogd.wiki&start=398)