bugGNU Screen - Bugs: bug #42984, Specify log file via command line...

 
 

bug #42984: Specify log file via command line parameter

Submitter:  None
Submitted:  Thu 14 Aug 2014 09:41:11 AM UTC
   
 
Category:  Feature Request Severity:  3 - Normal
Priority:  * 5 - Normal Status:  Fixed
Privacy:  Public Assigned to:  anaumov
Open/Closed:  Closed Release:  Cur Dev Sources
Fixed Release:  4.5.1 Planned Release:  4.5.1
Work Required:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 08 Feb 2017 08:45:09 AM UTC, comment #5: 

I updated the command, so it has better behaviour.
screen -Logfile <LOGFILENAME> => sets logfile to <LOGFILENAME>
screen -L -Logfile <LOGFILENAME> => sets logfile and enables logging

Amadeusz Sławiński <amade>
Group administrator
Fri 03 Feb 2017 10:41:24 PM UTC, comment #4: 

To specify logname via command line parameter we have "-L logfile" option now (release 4.5.1).

$ screen -L logfile <LOGFILENAME> => <LOGFILENAME>
$ screen -L => screenlog.0

Keep in mind, that default PATH is not ~/screenlog.0, but screenlog.0 (current directory).

For example, if your current PATH is /etc (where you have no write permissions) you CAN NOT use just "-L" option (default logfile name). In this case you will need to specify logfile like this:
$ pwd
/etc
$ screen -L logfile ~/screenlog.0


I will close this report. In case of bugs/problems, please open new one.

Alexander Naumov <anaumov>
Group administrator
Fri 19 Aug 2016 02:42:53 PM UTC, comment #3: 

Logfile's length comes from the PATH_MAX macro now.
Default logfile name remained as "screenlog.0".

Alexander Naumov <anaumov>
Group administrator
Wed 17 Aug 2016 01:03:28 PM UTC, comment #2: 

It works. Now it's possible to specify logfile's name with option "-L" in shell (by staring GNU screen).

Please keep in mind: it doesn't replace "logfile" value from the .screenrc file and you can't define name that starts with "-" symbol. Maximal name's size is 30 chars.

 http://git.savannah.gnu.org/cgit/screen.git/commit/?id=b8c6ea9efa1856d453800d07dd8852c91d5e1074

Hope, I didn't broke something else :)

Alexander Naumov <anaumov>
Group administrator
Wed 17 Aug 2016 08:34:07 AM UTC, comment #1: 

It seems that "logfile" command doesn't work at all in v4.4.0.
It's not possible to defile some other name then "screenlog.%n" at the moment...

Alexander Naumov <anaumov>
Group administrator
Thu 14 Aug 2014 09:41:11 AM UTC, original submission:  

Use case: I start up a custom shell script in screen via incron. I would like to log those screens to some destination other than the default `screenlog.%n`. The command `logfile filename` does what I want, but I cannot specify it via the command line.

where '$#' is the name of a newly changed file I have:

    screen -d -m -L -S $# addjob.sh $#

and would like to do

    screen -d -m -L -logfile ~/log/$#.log -S $# addjob.sh $#

or something.

Thank you for your consideration!

Florian

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by amade (Posted a comment)
  • -email is unavailable- added by anaumov (Posted a comment)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 10 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-02-03 anaumov Open/ClosedOpen Closed
    2017-02-03 anaumov StatusReady For Test Fixed
        Fixed ReleaseNone 4.5.1
        Planned ReleaseLater 4.5.1
    2016-08-17 anaumov StatusIn Progress Ready For Test
        Assigned toNone anaumov
        Release4.4.0 Cur Dev Sources
        Planned ReleaseNone Later
    2016-08-17 anaumov StatusNone In Progress
        ReleaseNone 4.4.0

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code