mIRC Home    About    Download    Register    News    Help

Print Thread
Line colors and logging #203633 22/08/08 05:28 PM
Joined: Aug 2007
Posts: 13
L
Lindrian Offline OP
Pikka bird
OP Offline
Pikka bird
L
Joined: Aug 2007
Posts: 13
Alright.
I have my custom made logviewer, which loads a specefic log file into a @window, nothing special. Im using /loadbuf -p @window file.

However, if I use this for example:
Code:
/echo 4 -at Hello 3hey test


It echos "hello" in red, "hey" in green and "test" in red.

But in the log file it looks like this:
Quote:
0402(121902:122602:120502) Hello 3hey test

(The long messy stuff after the first color is my timestamp)
This will echo my timestamp like normal, but "hello" is in white, "hey" in green and "test" in white aswell. Is there a way to make the logging work with the colors just like mirc does?

Im not sure if this should be a bug report or a feature request, however, feel free to move it if needed.

Last edited by Lindrian; 22/08/08 05:29 PM.
Re: Line colors and logging [Re: Lindrian] #203644 23/08/08 01:04 AM
Joined: Jan 2006
Posts: 468
symphony Offline
Fjord artisan
Offline
Fjord artisan
Joined: Jan 2006
Posts: 468
What are your logging settings? How your timestamp in your logging settings look like? I never had such problem before though.

Re: Line colors and logging [Re: symphony] #203648 23/08/08 11:44 AM
Joined: Aug 2007
Posts: 334
foshizzle Offline
Pan-dimensional mouse
Offline
Pan-dimensional mouse
Joined: Aug 2007
Posts: 334
well considering how the log file is read in a text editor, ud have to make the text editor read the chars like mirc does(thus enabling the colors)


This is not the signature you are looking for
Re: Line colors and logging [Re: foshizzle] #203649 23/08/08 12:12 PM
Joined: Dec 2002
Posts: 3,138
C
Collective Offline
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
Originally Posted By: foshizzle
well considering how the log file is read in a text editor, ud have to make the text editor read the chars like mirc does(thus enabling the colors)

Are you getting dumber?

Re: Line colors and logging [Re: Collective] #203673 23/08/08 11:15 PM
Joined: Mar 2003
Posts: 612
B
billythekid Offline
Fjord artisan
Offline
Fjord artisan
B
Joined: Mar 2003
Posts: 612
ROFLMAO laugh


billythekid
Re: Line colors and logging [Re: billythekid] #203684 24/08/08 01:21 PM
Joined: Aug 2007
Posts: 13
L
Lindrian Offline OP
Pikka bird
OP Offline
Pikka bird
L
Joined: Aug 2007
Posts: 13
Here's my logging settings: http://i34.tinypic.com/24fwm4w.jpg

Re: Line colors and logging [Re: Lindrian] #203688 24/08/08 01:54 PM
Joined: Jan 2006
Posts: 468
symphony Offline
Fjord artisan
Offline
Fjord artisan
Joined: Jan 2006
Posts: 468
lol @ Collective.

@Lindrian. I believe its your timestamp settings in anyway.

Re: Line colors and logging [Re: Lindrian] #203694 24/08/08 04:22 PM
Joined: Apr 2004
Posts: 862
Sat Offline
Hoopy frood
Offline
Hoopy frood
Joined: Apr 2004
Posts: 862
There are two obstacles in getting what you want to work. The second is the lack of support in /loadbuf for setting the line color based on the color in each log line (this could also be added as part of the -z switch to /filter). That would be a very valid feature suggestion.

For that, though, another obstacle needs to be fixed first, and I believe that this can in fact be considered a bug: namely, that the line color storage in the log file is ambiguous. As the helpfile states, the line color is only stored if it differs from the original color. This means that:

Code:
/echo 4 -a hi
and:
Code:
/echo -a <ctrl+k>04hi


are stored exactly the same way in the log file, namely as "<ctrl+k>04hi", even though they are different with respect to subsequent ctrl+o's or single ctrl+k's as your example shows.

As a result, there is currently no way to reliably decide for a line in a log file, whether this log line includes a line color or not. Even when it is known that "Line colors" was turned on in the options at the time of logging.

This could be fixed by altering mIRC's logging mechanism, to always include the line color prefix, i.e. even if the line color is actually the default color, if the first character on the line is a ctrl+k. That would remove the ambiguity during log parsing.

For now, you're basically out of luck. There just isn't enough information in the logfile to do this right, so there are no workarounds either. For your specific case you could make a workaround (involving /filter -k and seeing if a line starts with two color codes), but it would be slow and only work with your logs with the colored timestamps..


Saturn, QuakeNet staff
Re: Line colors and logging [Re: Sat] #203724 25/08/08 06:19 AM
Joined: Aug 2007
Posts: 13
L
Lindrian Offline OP
Pikka bird
OP Offline
Pikka bird
L
Joined: Aug 2007
Posts: 13
I see, thanks for the reply. Hopefully khaled will see this and 'fix' it. a -z switch for the /loadbuf would be perfect!

Re: Line colors and logging [Re: Lindrian] #204208 11/09/08 06:21 PM
Joined: Aug 2007
Posts: 13
L
Lindrian Offline OP
Pikka bird
OP Offline
Pikka bird
L
Joined: Aug 2007
Posts: 13
darn, was hoping for a response by someone on the "team", to tell if its a bug or not, and if there'll be a 'fix' for it.

As I said earlier, a -z switch similar to /filter would be really really good!

Re: Line colors and logging [Re: Lindrian] #204229 12/09/08 02:24 AM
Joined: Oct 2003
Posts: 3,918
A
argv0 Offline
Hoopy frood
Offline
Hoopy frood
A
Joined: Oct 2003
Posts: 3,918
I believe Sat pointed out that ths problem here is not due to a bug, just a limitation of how log files work, maybe a design flaw, depending on your point of view. So really, there's nothing to fix, just more features to add. It's important to point out, though, that /filter -z is not the "feature to add", here, so your request isn't going to happen until mIRC's logging mechanism undergoes the improvement Sat described above.


- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"
Re: Line colors and logging [Re: argv0] #204436 19/09/08 06:55 PM
Joined: Mar 2006
Posts: 393
T
The_JD Offline
Fjord artisan
Offline
Fjord artisan
T
Joined: Mar 2006
Posts: 393
If you were to make "on text" do something like this:

echo $color(text) $chan (CTRL+K) $+ $color(text) < $+ $nick $+ > $1-

wouldnt it work?


[02:16] * Titanic has quit IRC (Excess Flood)
Re: Line colors and logging [Re: The_JD] #204440 19/09/08 09:57 PM
Joined: Aug 2007
Posts: 13
L
Lindrian Offline OP
Pikka bird
OP Offline
Pikka bird
L
Joined: Aug 2007
Posts: 13
Originally Posted By: The_JD
If you were to make "on text" do something like this:

echo $color(text) $chan (CTRL+K) $+ $color(text) < $+ $nick $+ > $1-

wouldnt it work?
What? I didn't quite understand...

Re: Line colors and logging [Re: Lindrian] #204447 20/09/08 04:08 PM
Joined: Jan 2004
Posts: 162
R
RRX Offline
Vogon poet
Offline
Vogon poet
R
Joined: Jan 2004
Posts: 162
Originally Posted By: Lindrian
Originally Posted By: The_JD
If you were to make "on text" do something like this:

echo $color(text) $chan (CTRL+K) $+ $color(text) < $+ $nick $+ > $1-

wouldnt it work?
What? I didn't quite understand...

If you understood what Sat said, why don't you understand what The_JD said? That is making sure there is always a color code.

Re: Line colors and logging [Re: RRX] #204465 20/09/08 08:42 PM
Joined: Nov 2006
Posts: 1,559
H
Horstl Offline
Hoopy frood
Offline
Hoopy frood
H
Joined: Nov 2006
Posts: 1,559
'cause it's supposed to be a log viewer, not a logging script itself, I assume...