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

 
 

bug #42984: Specify log file via command line parameter

Submitted by:  None
Submitted on:  Thu 14 Aug 2014 09:41:11 AM UTC  
 
Category: Feature RequestSeverity: 3 - Normal
Priority: 5 - NormalStatus: Fixed
Privacy: PublicAssigned to: Alexander Naumov <anaumov>
Open/Closed: ClosedRelease: Cur Dev Sources
Fixed Release: 4.5.1Planned Release: 4.5.1
Work Required: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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>
Project 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>
Project AdministratorIn charge of this item.
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>
Project AdministratorIn charge of this item.
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>
Project AdministratorIn charge of this item.
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>
Project AdministratorIn charge of this item.
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 File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 10 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 03 Feb 2017 10:44:02 PM UTCanaumovOpen/ClosedOpen=>Closed
    Fri 03 Feb 2017 10:41:24 PM UTCanaumovStatusReady For Test=>Fixed
      Fixed ReleaseNone=>4.5.1
      Planned ReleaseLater=>4.5.1
    Wed 17 Aug 2016 01:03:28 PM UTCanaumovStatusIn Progress=>Ready For Test
      Assigned toNone=>anaumov
      Release4.4.0=>Cur Dev Sources
      Planned ReleaseNone=>Later
    Wed 17 Aug 2016 08:34:07 AM UTCanaumovStatusNone=>In Progress
      ReleaseNone=>4.4.0

    Back to the top


    Powered by Savane 3.1-cleanup1