mIRC Home    About    Download    Register    News    Help

Print Thread
logging file bug? #165237 24/11/06 07:32 AM
Joined: Oct 2003
Posts: 7
T
tonywong Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
T
Joined: Oct 2003
Posts: 7
I'm using WinXP SP2.

When I upgrade 6.2 to 6.21 and connect, the new log is in "mirc folder\" but not the original folder, "mirc folder\logs\".
And the filename in "mirc folder\" is #channel.1.log
If I disconnect, the session will be as follows:

Session Close: Fri Nov 24 14:32:18 2006

Session Start: Fri Nov 24 14:32:18 2006
Session Ident: #channel
[14:32] * Disconnected

When I close mIRC, the session will close again:
Session Close: Fri Nov 24 14:32:42 2006

and rename/add to #channel.log

The "View logs", of course, can't view the log after upgraded.
I do not automatically log all channels but one by one.

Re: logging file bug? #165238 24/11/06 09:31 AM
Joined: Oct 2003
Posts: 313
S
Sais Offline
Fjord artisan
Offline
Fjord artisan
S
Joined: Oct 2003
Posts: 313
First thing - check that the log folder hasn't been changed (I'm quite sure it didn't change when I upgraded, here) - it's in alt-o IRC->Logging; the button at the bottom of the dialogue.


Sais
Re: logging file bug? #165239 24/11/06 10:54 AM
Joined: Oct 2003
Posts: 7
T
tonywong Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
T
Joined: Oct 2003
Posts: 7
It hasn't been changed.

Re: logging file bug? #165240 24/11/06 11:36 AM
Joined: Oct 2003
Posts: 313
S
Sais Offline
Fjord artisan
Offline
Fjord artisan
S
Joined: Oct 2003
Posts: 313
Certainly on this (relatively) clean install, the log files are being stored in the directory specified there.

If I change it to C:\Program Files\mIRC\temp, then:

Code:
//echo -a $chan(#).logfile

-> C:\Program Files\mIRC\temp\#test2.Private.1.log


So maybe you have some script that's getting in between mIRC and its own settings...(?)


Sais
Re: logging file bug? #165241 24/11/06 02:24 PM
Joined: Oct 2003
Posts: 7
T
tonywong Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
T
Joined: Oct 2003
Posts: 7
I don't think so.

I test again with no script and aliases, the situation still happens.

After I re-logging (stop logging and enable it, choosing the same directory and file), the mirc.ini changes as follows:

Before:
[logging]
#channel=#channel.log

After:
[logging]
#channel=logs\#channel.log

I think that the logging folder in Alt+O->IRC->Logging does not work in individual logging.

And the session restart problem still exists when disconnect.

The current session stores in #channel.1.log and insert to #channel.log after session close. I don't know it is a bug or a new feature. I prefer the old one.

Re: logging file bug? #165242 24/11/06 07:40 PM
Joined: Aug 2004
Posts: 27
0
0nslaught Offline
Ameglian cow
Offline
Ameglian cow
0
Joined: Aug 2004
Posts: 27
[snip]

Quote:

The current session stores in #channel.1.log and insert to #channel.log after session close. I don't know it is a bug or a new feature. I prefer the old one.


Yeah, and this "breaks" things like:

Code:
//run $window($active).logfile


Well, it returns the log for the currently open window instead of the entire log file as it used to.

Code:
//run $mklogfn($active)


This, on the other hand, will return everything previous to the current conversation.

Re: logging file bug? #165243 24/11/06 10:07 PM
Joined: Oct 2003
Posts: 313
S
Sais Offline
Fjord artisan
Offline
Fjord artisan
S
Joined: Oct 2003
Posts: 313
Sorry, I'm still unable to reproduce the problem

I just kicked up an alias to make sure we're doing the same things:

Code:
alias logtest {
  var %ch = $iif($2,$2,#testlogging)
  var %fn = $+($mircdirlogs\,%ch,.log)

  if (%ch ischan) {
    if ($1) { clear %ch }
    ;; Initially set logging up
    !log on %ch -f %fn
    !echo -e %ch LOG ON [[ !log on %ch -f %fn ]]
    !echo %ch $iif($chan(%ch).logfile,$v1,$!null)
    !echo %ch $readini($mircini,logging,%ch)

    ;; turn logging off
    !log off %ch
    !echo -e %ch LOG ON [[ !log off %ch ]]
    !echo %ch LOGFILE: $iif($chan(%ch).logfile,$v1,$!null)
    !echo %ch INI    : $readini($mircini,logging,%ch)

    ;; Re-start logging - using same parameters as before
    !log on %ch -f %fn
    !echo -e %ch LOG ON [[ !log on %ch -f %fn ]]
    !echo %ch LOGFILE: $iif($chan(%ch).logfile,$v1,$!null)
    !echo %ch INI    : $readini($mircini,logging,%ch)
  }
  else {
    echo -a You must already have joined %ch
  }
}


For me, when I join #testlogging, then type "/logtest 1" this gives:

Code:
* Logging for #testlogging started
-
LOG ON [ !log on #testlogging -f I:\mIRC\logs\#testlogging.log ]
-
I:\mIRC\logs\#testlogging.DALnet.1.log
logs\#testlogging.log
* Logging for #testlogging halted
-
LOG ON [ !log off #testlogging ]
-
LOGFILE: $null
INI : off
* Logging for #testlogging started
-
LOG ON [ !log on #testlogging -f I:\mIRC\logs\#testlogging.log ]
-
LOGFILE: I:\mIRC\logs\#testlogging.DALnet.1.log
INI : logs\#testlogging.log


Which to me suggests all is in order. For you?


Sais
Re: logging file bug? #165244 24/11/06 11:59 PM
Joined: Aug 2004
Posts: 27
0
0nslaught Offline
Ameglian cow
Offline
Ameglian cow
0
Joined: Aug 2004
Posts: 27
Here are the steps to reproduce this issue*:

(Note: By "issue," I am referring only to $window($active).logfile not returning the the entire log file as it had before. (This broke a couple of my aliases, though I suppose it would not be that difficult to work around the problem.)]

1. Install mIRC cleanly (I don't see why this is necessary)

2. Fill out your information (Fullname, Nickname, and et cetera.)

3. In Options, navigate to IRC -> Logging

4. Choose Automatically log: Both

5. Press the "Ok" button.

6. In the status window, enter:
/server irc.somenetwork.net

7. /join #TestChannel

8. In #TestChannel, type: Test 1

9. Then: //run $window($active).logfile (You should receive the entire log.)

10. Everything seems fine, at this point. Type "/run logs" and you will see the one log file for the channel.

11. Now, /part the room.

12. The log "#TestChannel.SomeNetwork.1.log" will automatically be renamed to "#TestChannel.SomeNetwork.log" when the channel window closes.

13. /join #TestChannel

14. "/run logs" will now show two logs for #TestChannel.

15. Type: Test 2

16. Manually open both logs in your log folder. One will contain "Test 1" and one will contain "Test 2".

17. //echo -a $nopath($window($active).logfile)) = #TestChannel.SomeNetwork.1.log

//echo -a $mklogfn($active) = #TestChannel.SomeNetwork.log

#TestChannel.SomeNetwork.1.log and #TestChannel.SomeNetwork.log

18. /part will combine both logs back into a single file: #TestChannel.SomeNetwork.log

I'm guessing it's related to this:

73.Fixed logfiles bug resulting in lost or corrupted logfiles when connecting to multiple servers.

So, maybe an option to disable this behavior would be sufficient.

Re: logging file bug? #165245 25/11/06 12:34 AM
Joined: Oct 2003
Posts: 313
S
Sais Offline
Fjord artisan
Offline
Fjord artisan
S
Joined: Oct 2003
Posts: 313
Sorry - I was trying to get at TonyWong's directory issue.

The temporary logfile issue is obvious (or at least I thought it was; perhaps I should have made that clear)


Sais
Re: logging file bug? #165246 25/11/06 01:33 AM
Joined: Oct 2004
Posts: 8,327
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,327
Right. Active log files are in a temporary file now and will not be part of the "real" log file until you part the channel. I'm sure this broke a lot of scripts and makes loading the active log with the complete log more of a pain. Oh well.


Invision Support
#Invision on irc.irchighway.net
Re: logging file bug? #165247 25/11/06 06:15 PM
Joined: Oct 2003
Posts: 7
T
tonywong Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
T
Joined: Oct 2003
Posts: 7
hmm...I think I start logging using very early mIRC and the path in mirc.ini was:
[logging]
#channel=#channel.log
When upgrading mIRC it would not be changed.

5.81 or later the path is set as:
[logging]
#channel=logs\#channel.log
And it still supports "#channel=#channel.log" until 6.2, and it will be affected by changing the default log saving folder. "logs\#channel.log" will not be affected by the default folder.

And it is the answer of solving this problem. :tongue:

Try these steps to reproduce this issue.

1. Install a clean mIRC 5.71 (Yes, 5.71)
2. Fill in the necessary information
3. Connect to a server
4. Join a channel
5. Choose system menu of the channel (top left hand corner of a window, OR right click the channel button)
6. Then go to Logging, and it will ask you which destination to save the file
7. find a location to save it (e.g.: mirc folder\logs)
8. The channel will appear * Logging #channel to '#channel.log'
9. Quit and close mIRC
10. Replace mIRC to 6.21
11. Execute the mIRC 6.21 and connect again
12. Join the same channel
13. Then check the log

Or using 6.2:

1. Install a clean mIRC 6.2
2. Fill in the necessary information
3. Connect to a server
4. Join a channel
5. Choose system menu of the channel (top left hand corner of a window, OR right click the channel button)
6. Then go to Logging->, and it will ask you which destination to save the file
7. find a location to save it (e.g.: mirc folder\logs)
8. The channel will appear * Logging #channel to 'logs\#channel.log'
9. Quit and close mIRC
10. open mirc.ini and find [logging]
11. modify "#channel=logs\#channel.log" to "#channel=#channel.log" (acting as what 5.71 does)
12. Replace mIRC to 6.21
13. Execute the mIRC 6.21 and connect again
14. Join the same channel
15. Then check the log

I hope that it makes much clear about the issue.

Re: logging file bug? #165248 26/11/06 10:02 AM
Joined: Oct 2003
Posts: 313
S
Sais Offline
Fjord artisan
Offline
Fjord artisan
S
Joined: Oct 2003
Posts: 313
Umm. So you change the stored value in the ini file manually to something different, then expect it to do the same thing? That just seems like convoluted logic to me. (If it works, why change it?)

It does seem that the logging directories are stored relative to $mircdir instead of $logdir. though, which seems a little odd.


Sais
Re: logging file bug? #165249 26/11/06 03:32 PM
Joined: Oct 2003
Posts: 7
T
tonywong Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
T
Joined: Oct 2003
Posts: 7
I used mIRC for a very long time, upgrade when a new version is released and it works fine with the setting that "#channel=#channel.log".
But it works wrongly after upgraded to 6.21 this Friday and I posted the problem here.

I suppose that it changes "#channel.log" to "logs\#channel.log" from 6.2 to 6.21. But it is not. It should be much earlier version to 6.21.

Then the solution was found when I tested with the old version last night. :>

Re: logging file bug? #165250 26/11/06 05:44 PM
Joined: Mar 2003
Posts: 612
B
billythekid Offline
Fjord artisan
Offline
Fjord artisan
B
Joined: Mar 2003
Posts: 612
Quote:
It does seem that the logging directories are stored relative to $mircdir instead of $logdir. though, which seems a little odd.


Dunno, to me mIRC always ses $mircdir as root and as such we know to put paths relative to $mircdir if non-specific or to 'root' proper if outside the mIRC folder eg. C:\

I wouldn't like one set of commands to be different from the others. There's a similar post just now along the same lines...


btk


billythekid