|
chamenas Wizard
Joined: 26 Mar 2008 Posts: 1547
|
Posted: Thu Sep 18, 2008 4:06 am
A thought on GAGLOG and WRITELOG |
I really love that these are now in, and am looking forward to that small bug or whatever I discovered being fixed. But one thing that has been bugging me is the realization that these will not work on text that is logged from the buffer. The reason for this is that a good chunk of what I want to log, I'd say somewhere from 85-95% is stuff that I realize would be valuable AFTER it happened. Thus, logging from the buffer is extremely useful. I figure the reason these two functions are the way they are because of how the logging system works. But, I was wondering if there was any way to add it to your list of projects to maybe adjust it so they can work on buffered items too?
|
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Fri Sep 19, 2008 1:08 am |
Couldn't you do something like:
#WRITELOG %lines(1)
to write the previous line to the log? Now, it's possible that this won't capture the ANSI color codes, but maybe that's a simple option I can add to the %lines function. |
|
|
|
chamenas Wizard
Joined: 26 Mar 2008 Posts: 1547
|
Posted: Fri Sep 19, 2008 3:30 am |
Well, it's not a problem of the previous line as much as it's the entire log is usually, for me, in the buffer that gets logged. I fight someone or have a nice rp session and thing "oh, I should log it", but apparently the way gaglog and writelog work is that they only influence the log after logging has been turned on. Also not having ansi color would be sad. It's fine if it's not something you would do, but I just figured I'd throw it out there since I know I often don't realize I want to log something until after the fact which essentially makes my gaglog triggers useless.
|
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Fri Sep 19, 2008 10:48 am |
You could do this already by doing your logging from a second window. You would just do "#C+ LogWindow" in your main window. The second window would have the triggers for doing #GAGLOG and #WRITELOG, and those triggers would include #GAG and #PRINT commands. This way logging after the fact would pull from a buffer containing what you want.
Aliases in the main window could be used with #EXECWIN to turn the logging on and off. When you turn logging off you could issue #CLR to clean out the buffer. Also you could use %pref to control whether you want the buffer recorded or just new stuff.
About the only thing that might be missing is knowing whether or not the window is currently logging. I suppose you could keep track of it in a variable in your LogWindow. The reason to do that is because there is no sense in maintaining buffer synchronization while actively logging. |
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
chamenas Wizard
Joined: 26 Mar 2008 Posts: 1547
|
Posted: Fri Sep 19, 2008 4:31 pm |
Well I would love if that could solve my issue... but I have no clue what you just said or how to achieve it... or if it even actually solves the issue I have laid out because it's clear that I have miscommunicated in the past. Are you saying I should have the session open a "log window" upon connecting that gags and prints stuff like my gaglog and writelog would and then whenever I want to log it I would log from that window? How would I do that since I've only ever found myself logging from the main session window? Also, I've found the tabbed windows to be slow so I'm wary of opening another window while I do my main session. Is there a way to make it less obtrusive? Almost invisible?
|
|
|
|
chamenas Wizard
Joined: 26 Mar 2008 Posts: 1547
|
Posted: Mon Sep 22, 2008 4:08 am |
How do I make sure it logs only the second "logging" window unless I turn logging on (in which case it pulls from both?)
|
|
|
|
chamenas Wizard
Joined: 26 Mar 2008 Posts: 1547
|
Posted: Thu Sep 25, 2008 5:48 pm |
Anyone?
|
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Thu Sep 25, 2008 6:54 pm |
For some reason I keep expecting people to be able to think for themselves. Let's do a simple experiment:
1. Launch CMud
2. Close Sessions window (ESC)
3. Enter at the command line
Code: |
#WIN testlog
#EXECWIN testlog {#LOG {TestingLog.txt}}
#WIN testlog {Test Line 1}
#SHOW {Test line 2 not captured}
#C+ testlog
#SHOW {TestLine 3}
#C-
#EXECWIN testlog {#LOG} |
|
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
chamenas Wizard
Joined: 26 Mar 2008 Posts: 1547
|
Posted: Fri Sep 26, 2008 3:30 pm |
I got a parsing command error. It's fine, I suppose I'll figure it out.
|
|
|
|
|
|