1.0/.89 Issue - Logfiles

An instant messenger which can connect to AIM, GTalk, Jabber, ICQ, and more.
Post Reply
mushoo
Harmless
Posts: 5
Joined: Mon Mar 13, 2006 1:31 am

1.0/.89 Issue - Logfiles

Post by mushoo »

Normally I would avoid posting with problems for an SVN build I did myself, but this one seems to have caused problems with moving back to .89.

Please note that I haven't gotten as drastic as to erase my preferences, which would likely fix part of the problem. Anyway, here it is.

1.0, as I'm guessing the devs know, doesn't seem to organize logfiles for me correctly. If I want to view just one person's logs, it still loads all the logs that I have (sort of). If I choose someone to view in the 'Contacts' sidebar, it arbitrarily chooses a random logfile to view. Interestingly, it won't list any logfiles past January 10th (initially) or February 27th (after clicking on a Contact to view). There are some odd problems with scrolling as well.

I use the logging function quite a bit, so when I was done toying around with 1.0, I moved back to .89. Problem is that now my logfiles don't format correctly. Instead of seeing nicely colored and styled messages, I get the raw XML data, which is wonderfully annoying to parse through on my own.

Any ideas? Preferably a way for me to fix the problem in 1.0, as I like it a lot. I _can_ code, but I'm really no good with huge projects like Adium.
Spartan
Frappa
Posts: 132
Joined: Tue Mar 29, 2005 3:49 am

Post by Spartan »

About your preferences, I'm pretty sure SVN/1.0 is a one-way ticket. As for the log viewer, if you look at the recent blog post, you will see that the whole system is being re-written. Being in its unfinished state, I don't think there is much you can expect out of it right now.
mushoo
Harmless
Posts: 5
Joined: Mon Mar 13, 2006 1:31 am

Post by mushoo »

Aha, I figured it was something like that. Right now I've just backed up all my logfiles from the past, oh, 3 years. Starting with a fresh set at least lets me search them by hand relatively easily.

Thanks for the quick response.
User avatar
evands
Cocoaforge Admin
Posts: 3152
Joined: Thu Dec 02, 2004 10:55 pm
Location: Decatur, GA
Contact:

Post by evands »

The 0.89 loading problem is actually a very simple thing:
1.0svn uses .AdiumHTMLLog for log files, and updated all your log files to have that extension.
0.89 used .html

Renaming them back will make 0.89 view them as html instead of plain text... I leave it as an exercise to the reader or a forum goer to shell script this :)

1.0's log viewer is _very_ incomplete right now, the beginning of a Spotlight-based log viewer proof of concept.
The duck still burns.
--
My company: Saltatory Software. Check it out :)
mushoo
Harmless
Posts: 5
Joined: Mon Mar 13, 2006 1:31 am

Post by mushoo »

Aha, gotcha. Any particular reason for the extension shift?
User avatar
The_Tick
Cocoaforge Admin
Posts: 4642
Joined: Thu Dec 02, 2004 6:06 am
Contact:

Post by The_Tick »

mushoo wrote:Aha, gotcha. Any particular reason for the extension shift?
Spotlight
User avatar
Catfish_Man
Cocoaforge Admin
Posts: 1203
Joined: Thu Dec 02, 2004 6:30 am
Location: Portland, Oregon
Contact:

Post by Catfish_Man »

The_Tick wrote:
mushoo wrote:Aha, gotcha. Any particular reason for the extension shift?
Spotlight
and removing massive amounts of suck (message history being hard to do, searching being unreliable/slow)
User avatar
memark
Frappa
Posts: 163
Joined: Sat May 28, 2005 8:44 am
Location: Sweden, Göteborg

Post by memark »

evands wrote:Renaming them back will make 0.89 view them as html instead of plain text... I leave it as an exercise to the reader or a forum goer to shell script this :)
You really included all the characters shell scripts like in the file names, such as spaces and parentheses. :twisted:
Regards
Magnus Erik Markling
User avatar
memark
Frappa
Posts: 163
Joined: Sat May 28, 2005 8:44 am
Location: Sweden, Göteborg

Post by memark »

The problem essentially boils down to getting the log file names to appear correctly in a for/foreach-loop (in either sh or csh). The problem now is the space in the middle of the file name. Apart from that it works. Any ideas?
Regards
Magnus Erik Markling
User avatar
memark
Frappa
Posts: 163
Joined: Sat May 28, 2005 8:44 am
Location: Sweden, Göteborg

Post by memark »

Done!

Use this script at your own risk. Please make your own backup copy of your logs, just in case mine fails.

Code: Select all

#!/bin/bash
# 
# Changes all Adium log files converted by 1.0 back to 0.8x naming standard.
# Written by Magnus "MEMark" Markling 2006-03-16.

# The base directory for the Adium user
BASE=~/Library/Application\ Support/Adium\ 2.0/Users/Default

# Make a backup of the log directory
cp -R "$BASE/Logs" "$BASE/Logs backup"

# Find all files ending in .AdiumHTMLLog in $BASE/Log and its subdirectories
find "$BASE/Logs" -name \*.AdiumHTMLLog | while read file; do
  # Rename each file from .AdiumHTMLLog to .html
  echo mv \"$file\" \"`echo $file | sed 's/\(.*\.\)AdiumHTMLLog/\1html/'`\" | sh
done

echo All done!
Regards
Magnus Erik Markling
dfunct
Muffin
Posts: 31
Joined: Sat Feb 12, 2005 7:04 pm

Post by dfunct »

Awesome script worked just beautifully :)

Thanks
Post Reply