4

I have set up a screen rc file like this:

log on
shelltitle apt
logfile $HOME/configs/screen/screenlogs/apt.log
logtstamp after 120

and I am starting like this:

screen -c ~/configs/screen/apt.rc

But after using for a while the apt.log file is never created. The syntax looks perfect to me, unless there is something about the logfile syntax I am not getting

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
vfclists
  • 19,193
  • 21
  • 73
  • 92

1 Answers1

8

You simply need to change

log on

to

deflog on

The log command sets logging for the current window. At the time the .rc file is read, there is no current window. deflog sets the default for logging of newly created windows.

Alternatively you could add commands to your rc file to create an initial window and turn logging on for it.

(Damn, screen does everything.)

Michael Slade
  • 13,802
  • 2
  • 39
  • 44
  • Funnily enough I used deflog which I felt was the right command somewhere in the file at the start and I was getting an error. I may used it out of sequence – vfclists Apr 08 '12 at 09:13