Skip to content
This repository has been archived by the owner on Apr 19, 2024. It is now read-only.

Allow to set log file using command line -log #97

Closed
u1735067 opened this issue Aug 31, 2013 · 5 comments
Closed

Allow to set log file using command line -log #97

u1735067 opened this issue Aug 31, 2013 · 5 comments

Comments

@u1735067
Copy link
Contributor

I intend to use PuTTYTray with MTPuTTY, which can create virtuals sessions on one real PuTTY session, containing for exemple default settings (font, size, ..), but I'd like to set the log file individually for each session using arguments.
KiTTY is able to do that (and it seems to be the only one :( ) but it is a bit too much in feature for me.

Could you implement a -log command line option that allow to override the log file contained in the session ?

Ex: putty.exe -load "!Défaut" -log myserver.log my.server.net

@FauxFaux
Copy link
Owner

FauxFaux commented Sep 1, 2013

Yoink!

Note to self: These are implemented in cmdline.c, not directly in window.c like KiTTY.

@FauxFaux FauxFaux closed this as completed Sep 1, 2013
@FireEgl
Copy link
Contributor

FireEgl commented Sep 2, 2013

Why are these being forced along with setting the log filename?

  •    conf_set_int(conf, CONF_logtype, 1);
    
  •    conf_set_int(conf, CONF_logxfovr, 1);
    
  •    conf_set_int(conf, CONF_logflush, 1); 
    

@FauxFaux
Copy link
Owner

FauxFaux commented Sep 2, 2013

I just did what KiTTY was doing.

Turning the logging on makes sense... if you're assuming it's overriding the default settings, and that the logging is off. Perhaps it should set the logtype only if the logtype is off?

Otherwise the parameter does nothing when the logging is disabled, which doesn't seem like what people would expect.

I'm not sure what I feel about overwrite and flush. Maybe the intention here is to have it act like app > logfile.log would for typical shells.

Mmm.

@u1735067
Copy link
Contributor Author

u1735067 commented Sep 5, 2013

I don't see why overwrite should be forced ; if my template/filename is wrong I'd rather have my log file "corrupted" with new data appended than completly overwrited ;)
Simplest should be no to force this.
But I don't see why the 2 others should be forced too, if I want to log "ssh packets" it seems impossible using -log.
Maybe you could also make a -logfile option that only change the log location but keeps other settings untouched from the session ?

Anyway thank you, will you release soon a release including this ?

@u1735067
Copy link
Contributor Author

I don't know if you still have notifications in this issue @FauxFaux , but could you correct the behaviour of this option ?
ie :

  • set logtype only if disabled (like you said)
  • don't touch overwrite (that's my principal issue) and flush options

Maybe I could write a patch for this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants