Go Back   The macosxhints Forums > OS X Help Requests > System



Reply
 
Thread Tools Rating: Thread Rating: 3 votes, 5.00 average. Display Modes
Old 11-11-2007, 04:18 PM   #1
anika123
All Star
 
Join Date: Sep 2006
Posts: 860
console log only couple lines

I am not sure what has changed but console.app only shows a couple of lines in the console log and all messages log. I am using leopard and i think this may have occurred after the osx weekly and monthly scripts were run by macaroni. This could be just coincidence though. Any ideas on how to fix my logs? The system log is fine.
anika123 is offline   Reply With Quote
Old 11-12-2007, 07:50 PM   #2
anika123
All Star
 
Join Date: Sep 2006
Posts: 860
Any ideas people? It appears I only get the last line after boot and login and no more.
anika123 is offline   Reply With Quote
Old 11-12-2007, 11:43 PM   #3
Hal Itosis
Hall of Famer
 
Join Date: Apr 2002
Posts: 3,315
Not sure how to fix, but that is one definite change in Leopard.
It works fine here (Console.app that is)... but I'm not sure how.

console.log used to be in /Library/Logs/... under Console/[shortname]/console.log
for pre-Tiger Macs, and later under Console/[uidnumber]/console.log with Tiger.

Now I can't find the actual log file anywhere.

Does anyone know where "console.log" has moved to in Leopard?

-HI-
Hal Itosis is offline   Reply With Quote
Old 11-13-2007, 01:28 PM   #4
ataraxia
Major Leaguer
 
Join Date: Aug 2004
Location: Pittsburgh
Posts: 349
I believe the console log (along with duplicates of anything else that shows up under "all messages") are stored in binary format in /private/var/log/asl.db . This file replaces the asl.log that used to be there.
ataraxia is offline   Reply With Quote
Old 11-13-2007, 10:54 PM   #5
Hal Itosis
Hall of Famer
 
Join Date: Apr 2002
Posts: 3,315
Quote:
Originally Posted by ataraxia
I believe the console log (along with duplicates of anything else that shows up under "all messages") are stored in binary format in /private/var/log/asl.db . This file replaces the asl.log that used to be there.


-rw------- 1 root wheel - 433040 Nov 13 23:20 /private/var/log/asl.db

Hmm, that's a little overprotected for a "console log" isn't it?

We can at least read system.log

-rw-r----- 1 root admin - 98000 Nov 13 23:17 /private/var/log/system.log

It's gotta be somewhere where we can use Terminal to view/search/monitor it.

No? [without a root shell i mean]
Hal Itosis is offline   Reply With Quote
Old 11-14-2007, 10:20 AM   #6
oldfogey
Prospect
 
Join Date: Sep 2002
Location: London
Posts: 31
Quote:
Originally Posted by Hal Itosis
It's gotta be somewhere where we can use Terminal to view/search/monitor it.

No? [without a root shell i mean]

As far as I can see, all the Console messages also appear in system.log. But a lot of stuff that used to appear in Console in Tiger seems to be missing.
oldfogey is offline   Reply With Quote
Old 11-14-2007, 05:21 PM   #7
anika123
All Star
 
Join Date: Sep 2006
Posts: 860
This is odd because before macaroni rotated the logfiles (which it probably thought were still tiger log files) everything looked and acted normal. Afterwards, the logs displayed this new behavior of putting most things in system.log and nothing in the other logs.
anika123 is offline   Reply With Quote
Old 11-14-2007, 06:10 PM   #8
oldfogey
Prospect
 
Join Date: Sep 2002
Location: London
Posts: 31
Quote:
Originally Posted by Hal Itosis
It's gotta be somewhere where we can use Terminal to view/search/monitor it.

Try
syslog -C | more

Didn't know this earlier :-)
oldfogey is offline   Reply With Quote
Old 11-14-2007, 06:13 PM   #9
oldfogey
Prospect
 
Join Date: Sep 2002
Location: London
Posts: 31
Quote:
Originally Posted by anika123
This is odd because before macaroni rotated the logfiles (which it probably thought were still tiger log files) everything looked and acted normal. Afterwards, the logs displayed this new behavior of putting most things in system.log and nothing in the other logs.

If you look at the rotated logs, you'll see the last message in console was produced when you were still running Tiger.
oldfogey is offline   Reply With Quote
Old 11-14-2007, 07:54 PM   #10
anika123
All Star
 
Join Date: Sep 2006
Posts: 860
Quote:
If you look at the rotated logs, you'll see the last message in console was produced when you were still running Tiger.

No, thats not how it was. I actually was heavily monitoring my console and all messages logs for days after leopard. I sent several developers the errors from my console.log. Then I got the bright idea to do the monthly maintenance and surprise, no more console.log.
anika123 is offline   Reply With Quote
Old 11-14-2007, 10:19 PM   #11
hayne
Site Admin
 
Join Date: Jan 2002
Location: Montreal
Posts: 32,387
Some extracts from the Apple doc on daemons: http://developer.apple.com/technotes/tn2005/tn2083.html
Quote:
Originally Posted by above Apple doc
Apple System Log
The Apple System Log (ASL) is a logging facility introduced in Mac OS X 10.4. It allows you to create flexible, structured log entries. It also allows you to write management tools that query these logs.

For information about ASL, see its man page.

[...]

For applications running on Mac OS X 10.5 and later, launchd will redirect stdout and stderr to ASL (much as it does for launchd agents).

For applications running on systems prior to Mac OS X 10.5, stdout and stderr go directly into the console log.

I.e. this confirms what oldfogey said above - the way to view console log entries in Leopard is via 'syslog -C'
(See: http://developer.apple.com/documenta.../syslog.1.html)
__________________
hayne.net/macosx.html

Last edited by hayne; 11-14-2007 at 10:23 PM.
hayne is offline   Reply With Quote
Old 11-14-2007, 11:14 PM   #12
Hal Itosis
Hall of Famer
 
Join Date: Apr 2002
Posts: 3,315
Quote:
Originally Posted by oldfogey
Try syslog -C | more

Hmm, thanks for that.

But then... how would we continuously "monitor" that? [like the way Console.app does].

If it were a file we could: tail -f /path/to/log

But tail -f won't/can't do the "-f" part on a pipe... unless
there's a 'named pipe' (FIFO file) somewhere?

--

Ooooops.... just read the man page hayne linked to.
We do that like so:

syslog -w 20




Hmmm, but that "-w" can't be combined with "-C".
[it freaks out]

Last edited by Hal Itosis; 11-14-2007 at 11:24 PM.
Hal Itosis is offline   Reply With Quote
Old 11-15-2007, 09:08 AM   #13
anika123
All Star
 
Join Date: Sep 2006
Posts: 860
ok I see, console.app was apparently not updated to reflect the new log rules. I guess there would have to be a version for tiger and then one for leopard. Otherwise in 10.5 you have the now useless "console and All messages" logs showing up in the "log database queries" section of the console.app.
anika123 is offline   Reply With Quote
Old 12-03-2007, 02:17 PM   #14
anika123
All Star
 
Join Date: Sep 2006
Posts: 860
just to follow up, my problem magically disapeared after I upgraded to Macaroni 2.1
anika123 is offline   Reply With Quote
Old 12-14-2007, 09:44 AM   #15
kbmb
Prospect
 
Join Date: Oct 2007
Posts: 22
I have this same issue where suddenly my LOG DATABASE QUERIES All Message query is resetting after console.app is closed.

Any ideas on why this change occured? Prior to last night's Quicktime update and an Adobe Flash update....the All Messages worked fine with keeping the log windows showing all the logs lines.

-Kevin
__________________
Mac Pro 2.66 GHz, 23" ACD // MacBook 2.4 GHz // Mac & Tech http://www.macandtech.com
kbmb is offline   Reply With Quote
Old 12-14-2007, 11:10 AM   #16
kbmb
Prospect
 
Join Date: Oct 2007
Posts: 22
So after some searching, I didn't find this specific issue, but what I think was happening was the database that stores all the logs on my system, got to be about 24 MB. The DB is located at /var/log/asl.db

This site here:
http://smartic.us/2007/11/8/leopard-...y-time-machine

Discusses something different, but the comments talk about the asl.db file.

So I tried the following commands, as per one of the comments:

sudo launchctl stop com.apple.syslogd
sudo rm /var/log/asl.db
sudo launchctl start com.apple.syslogd

Those commands removed the asl.db file, but it wasn't being recreated. So I rebooted. After the reboot, the file is back and my console is acting mornally again.

-Kevin
__________________
Mac Pro 2.66 GHz, 23" ACD // MacBook 2.4 GHz // Mac & Tech http://www.macandtech.com
kbmb is offline   Reply With Quote
Old 01-06-2008, 12:13 PM   #17
anika123
All Star
 
Join Date: Sep 2006
Posts: 860
http://www.macosxhints.com/article.p...8&query=syslog

this hint discusses the growing log problem and proposes a solution.
anika123 is offline   Reply With Quote
Old 04-17-2008, 09:11 PM   #18
hisara
Major Leaguer
 
Join Date: Mar 2006
Posts: 280
So did i understand correctly that console log entries are now in system.log?

Are there any entries that are not logged to system.log but was in console.log?
hisara is offline   Reply With Quote
Old 04-17-2008, 10:57 PM   #19
Red_Menace
All Star
 
Join Date: Mar 2006
Location: Littleton, Colorado, USA
Posts: 515
The System and Console logs both go into the ASL database, which can be manipulated with the syslog utility. System logs also get echoed to /var/log/system.log, but Console logs aren't echoed to a text file anymore in Leopard - the Console.app extracts them using the equivalent of syslog -C or syslog -k Facility com.apple.console.
Red_Menace is offline   Reply With Quote
Old 04-19-2008, 08:32 AM   #20
hisara
Major Leaguer
 
Join Date: Mar 2006
Posts: 280
Quote:
Originally Posted by Red_Menace
The System and Console logs both go into the ASL database, which can be manipulated with the syslog utility. System logs also get echoed to /var/log/system.log, but Console logs aren't echoed to a text file anymore in Leopard - the Console.app extracts them using the equivalent of syslog -C or syslog -k Facility com.apple.console.

Thanks.

These unix commands are too kinky to my skills.

If i want to get entire Console log to text file, how i do that? If i just use some of those above syslog codes, then i lose rest of the Console messages from that point to next rotation. And if i do it every hour, then i still lose on average 30 minutes worth of Console messages when its rotated?
hisara is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 01:27 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.