Page 1 of 1

1.0/.89 Issue - Logfiles

Posted: Mon Mar 13, 2006 2:00 am
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.

Posted: Mon Mar 13, 2006 2:09 am
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.

Posted: Mon Mar 13, 2006 2:11 am
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.

Posted: Mon Mar 13, 2006 2:58 am
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.

Posted: Mon Mar 13, 2006 3:09 am
by mushoo
Aha, gotcha. Any particular reason for the extension shift?

Posted: Mon Mar 13, 2006 3:12 am
by The_Tick
mushoo wrote:Aha, gotcha. Any particular reason for the extension shift?
Spotlight

Posted: Mon Mar 13, 2006 3:15 am
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)

Posted: Mon Mar 13, 2006 1:47 pm
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:

Posted: Mon Mar 13, 2006 2:44 pm
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?

Posted: Mon Mar 13, 2006 6:53 pm
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!

Posted: Wed Mar 15, 2006 12:58 pm
by dfunct
Awesome script worked just beautifully :)

Thanks