Upon running screen with the -L flag, a file called 'screenlog.0' is created and all output written to it (which is great), but I will be running several screen sessions and I need to identify the logs with a unique number. Is it possible to change the log name?
相关问题
- Is shmid returned by shmget() unique across proces
- how to get running process information in java?
- I want to trace logs using a Macro multi parameter
- Error message 'No handlers could be found for
- convert logback.xml to log4j.properties
Probably the easiest way is to use the following:
Alternatively, there's a way to do it online.
Enter command mode in screen via Ctrl+a, : and use the
logfile
command with the name of the file you want as argument, eg:logfile whatevernameyoulike.log
Source: screen man page
You can edit your
.screenrc
file and add something like thisEdit: already answered: https://serverfault.com/questions/248193/specifying-a-log-name-for-screen-output-without-relying-on-screenrc
Use
script
command inside yourscreen
session.