|
Dwoggurd |
Posted: Sat Nov 08, 2008 11:11 am
[2.37] HTML logging broken? Still buggy in [3.09] |
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Fri May 01, 2009 12:15 am |
If you cannot reproduce the effect of direct mud output without using an embedded ESC character, then perhaps the mud is outputting something that you are not reproducing. The %e does reproduce an ESC character, and using an embedded escape code will break cmud parsing. So the fact that you are seeing a problem when using an embedded ESC character is not unexpected. What you need to do is figure out what the difference is between the mud output and the #show commands that are working. Have you actually examined the mud output with the method I suggested last time? If you did, could you paste it here? Maybe the mud is outputting something odd. Or perhaps we need to see debugger output, with raw input/output included (I'm afraid I'm not the best one for interpreting that output).
Sorry about the #sendprompt. I meant #showprompt. |
|
|
|
Dwoggurd Wanderer
Joined: 29 Jan 2008 Posts: 63
|
Posted: Fri May 01, 2009 3:30 am |
This thread has two topics:
1) HTML logging problems. You can read about them in first several posts (I don't rehash them in this post)
2) Run-time problem which also has HTML logging problem. This is new problem for 3.06. Even though I posted several posts trying to explain what I see, I decided to gather them together and make yet another post about this specific run-time problem.
I simplified the trigger so it has no ansi color codes or ESC chars, thus various syntax issues should not distract us from the root cause. Here it is:
Code: |
<trigger priority="101" case="true" ansi="true" stop="true" regex="true" id="18">
<pattern>(^<.*\d+.*> )(.+)$</pattern>
<value>#PRINT %1
#SHOW %2</value>
</trigger>
|
Experiment 1
The trigger is invoked by the real mud output.
First try is with red color (which has simple ESC code). What I see on my screen (sorry for yellow on white):
You flee from combat!
<13%hp> s
s
Alas, you cannot go that way.
<13%hp> Alas, you cannot go that way.
<13%hp>
Alas, you cannot go that way.
Script debugger:
Code: |
a test |You flee from combat!
a test |
a test ]<13%hp>
h test ]<<ESC>[31m13%hp> <ESC>[0m
---
c test | [1] test Comline : start :
a test |<13%hp> s
h test |<<ESC>[31m13%hp> <ESC>[2Ss<ESC>[0m
i test >s<CR><LF>
d test | [1] test Comline : stopped
---
c test | [1] test Comline : start :
a test |s
h test |<ESC>[2Ss<ESC>[0m
i test >s<CR><LF>
d test | [1] test Comline : stopped
i test <Alas, you cannot go that way.<LF><CR><LF><CR>
<<ESC>[31m13%<ESC>[0mhp>
a test |Alas, you cannot go that way.
a test |
a test ]<13%hp>
h test ]<<ESC>[31m13%hp> <ESC>[0m
i test <Alas, you cannot go that way.<LF><CR><LF><CR>
<<ESC>[31m13%<ESC>[0mhp>
a test |<13%hp> Alas, you cannot go that way.
h test |<<ESC>[31m13%hp> Alas, you cannot go that way.<ESC>[0m
f test | Pattern: (^<.*\d+.*> )(.+)$ : (%1="<[31m13%hp> ", %2="Alas, you cannot go that way.[0m")
c test | exec : Pattern "(^<.*\d+.*> )(.+)$" : #PRINT %1 #SHOW %2
a test |<13%hp>
h test |<ESC>[1S<<ESC>[31m13%hp> <ESC>[0m
a test |Alas, you cannot go that way.
|
HTML log. Notice misplaced span-tags and unclosed colors.
Code: |
You flee from combat!<br/>
<br/>
<<span style="color:#800000;">13%hp> <span style="color:#F0E68C;"><span style="color:khaki;">s</span></span></span><br/>
<span style="color:#F0E68C;"><span style="color:khaki;">s</span></span><br/>
Alas, you cannot go that way.<br/>
<br/>
<<span style="color:#800000;">13%hp> Alas, you cannot go that way.</span><br/>
<span style="color:#00FFFF;"><span style="color:aqua;"><</span></span><span style="color:#800000;">13%hp> </span><br/>
Alas, you cannot go that way.<br/>
|
Second try is with yellow color (which has "compound" ESC code). In this case I don't see problems on my screen nor in my HTML log.
<25%hp> s
s
Alas, you cannot go that way.
<25%hp> Alas, you cannot go that way.
<25%hp>
Alas, you cannot go that way.
Script debugger:
Code: |
h test ]<<ESC>[1;33m25%<ESC>[0mhp> <ESC>[0m
---
c test | [1] test Comline : start :
a test |<25%hp> s
h test |<<ESC>[1;33m25%<ESC>[0mhp> <ESC>[2Ss<ESC>[0m
i test >s<CR><LF>
d test | [1] test Comline : stopped
---
c test | [1] test Comline : start :
a test |s
h test |<ESC>[2Ss<ESC>[0m
i test >s<CR><LF>
d test | [1] test Comline : stopped
i test <Alas, you cannot go that way.<LF><CR><LF><CR>
<<ESC>[33;1m25%<ESC>[0mhp>
a test |Alas, you cannot go that way.
a test |
a test ]<25%hp>
h test ]<<ESC>[1;33m25%<ESC>[0mhp> <ESC>[0m
i test <Alas, you cannot go that way.<LF><CR><LF><CR>
<<ESC>[33;1m25%<ESC>[0mhp>
a test |<25%hp> Alas, you cannot go that way.
h test |<<ESC>[1;33m25%<ESC>[0mhp> Alas, you cannot go that way.<ESC>[0m
f test | Pattern: (^<.*\d+.*> )(.+)$ : (%1="<[1;33m25%[0mhp> ", %2="Alas, you cannot go that way.[0m")
c test | exec : Pattern "(^<.*\d+.*> )(.+)$" : #PRINT %1 #SHOW %2
a test |<25%hp>
h test |<ESC>[1S<<ESC>[1;33m25%<ESC>[0mhp> <ESC>[0m
a test |Alas, you cannot go that way.
|
HTML log:
Code: |
<<span style="color:#FFFF00;">25%</span>hp> <span style="color:#F0E68C;"><span style="color:khaki;">s</span></span><br/>
<span style="color:#F0E68C;"><span style="color:khaki;">s</span></span><br/>
Alas, you cannot go that way.<br/>
<br/>
<<span style="color:#FFFF00;">25%</span>hp> Alas, you cannot go that way.<br/>
<span style="color:#00FFFF;"><span style="color:aqua;"><</span></span><span style="color:#FFFF00;">25%</span>hp> <br/>
Alas, you cannot go that way.<br/>
|
Experiment 2
This time my trigger is invoked by two #SHOW commands. Both use red color. One is "correctly" written, using %ansi() and other is using an embedded ESC code.
On my screen I see incorrect coloring only for the second #SHOW command. However, the HTML log is broken for both cases.
#show <%ansi(red)10%ansi(reset)hp 1 1> you fled!
#show <[31m10%ansi(reset)hp 1 1> you fled!
<10hp 1 1> you fled!
<10hp 1 1>
you fled!
<10hp 1 1> you fled!
<10hp 1 1>
you fled!
Script debugger:
Code: |
c test | [1] test Comline : start :
a test |<10hp 1 1> you fled!
h test |<<ESC>[31m10<ESC>[0mhp 1 1> you fled!
f test | Pattern: (^<.*\d+.*> )(.+)$ : (%1="<[31m10[0mhp 1 1> ", %2="you fled!")
c test | exec : Pattern "(^<.*\d+.*> )(.+)$" : #PRINT %1 #SHOW %2
a test |<10hp 1 1>
h test |<ESC>[1S<<ESC>[31m10hp 1 1> <ESC>[0m
a test |you fled!
a test |<10hp 1 1> you fled!
h test |<<ESC>[31m10hp 1 1> you fled!<ESC>[0m
f test | Pattern: (^<.*\d+.*> )(.+)$ : (%1="<[31m10hp 1 1> ", %2="you fled![0m")
c test | exec : Pattern "(^<.*\d+.*> )(.+)$" : #PRINT %1 #SHOW %2
a test |<10hp 1 1>
h test |<ESC>[1S<<ESC>[31m10hp 1 1> <ESC>[0m
a test |you fled!
d test | [1] test Comline : stopped
|
HTML log:
Code: |
<<span style="color:#800000;">10</span>hp 1 1> you fled!<br/>
<span style="color:#00FFFF;"><span style="color:aqua;"><</span></span><span style="color:#800000;">10hp 1 1> </span><br/>
you fled!<br/>
<<span style="color:#800000;">10hp 1 1> you fled!</span><br/>
<span style="color:#00FFFF;"><span style="color:aqua;"><</span></span><span style="color:#800000;">10hp 1 1> </span><br/>
you fled!<br/>
<br/>
|
|
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Fri Jul 10, 2009 8:09 pm |
This should be fixed in the 3.09 beta version (today or tomorrow), so give it another try and let me know if there is still a problem.
|
|
|
|
Dwoggurd Wanderer
Joined: 29 Jan 2008 Posts: 63
|
Posted: Sat Jul 18, 2009 8:56 pm |
Most of problems are fixed in 3.09.
But I still notice some bugs with html logging.
Steps to reproduce:
Triggers.
The difference is that "aaa" variant uses standard colors and "bbb" uses custom colors.
Code: |
<trigger priority="190" case="true" regex="true" id="19">
<pattern>===(aaa)===</pattern>
<value>#CW green
#PCOL red %x1</value>
</trigger>
<trigger priority="200" case="true" regex="true" id="20">
<pattern>===(bbb)===</pattern>
<value>#CW #448877
#PCOL #887766 %x1</value>
</trigger> |
Alias to invoke:
Code: |
<alias name="go" id="10">
<value>#clr
#show ===aaa===OOO
#show ===bbb===OOO
</value>
</alias> |
On the screen everything looks fine
But in a log file "bbb" variant has unclosed tags and is formed in a wierd way (nested tags).
HTML log:
Code: |
<span style="color:#00B300;">===</span><span style="color:#800000;">aaa</span><span style="color:#00B300;">===</span>OOO<br/>
<span style="color:#448877;">===<span style="color:#887766;">bbb<span style="color:#448877;">===</span></span>OOO<br/>
|
|
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Sun Jul 19, 2009 3:27 am |
Please post this to the BETA forum (start a new topic there)
Everyone, PLEASE try to keep issues related to the BETA version in the BETA forum. If you post beta issues in this regular forum, the chance of me missing them is very high. And I don't want to bother the users of the public version with a bunch of beta bug report discussion. Thanks. |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|