Thread View: news.software.readers
3 messages
3 total messages
Started by Lloyd Zusman
Sun, 02 May 1999 00:00
[slrn] [repost] Command-line option request for slrnpull
Author: Lloyd Zusman
Date: Sun, 02 May 1999 00:00
Date: Sun, 02 May 1999 00:00
19 lines
1692 bytes
1692 bytes
[ Note: this is a repost of an article I submitted around a week ago.
I never saw any replies, and so I'm trying again, in case this
might have been due to a news propagation error. ]
I have a request for a new command-line option for slrnpull: I think
it would be useful to be able to specify the log file via an optional
argument, such as `-l logfile' or `--logfile logfile' or both. This
would allow us to optionally cause the slrnpull logfile to be written
to a meaningful place.
I'd be happy to supply a patch, if no one else wants to do this.
What do you folks think?
--
Lloyd Zusman
l...@asfast.com
Re: [slrn] [repost] Command-line option request for slrnpull
Author: Lloyd Zusman
Date: Sun, 02 May 1999 00:00
Date: Sun, 02 May 1999 00:00
20 lines
1444 bytes
1444 bytes
da...@space.mit.edu (John E. Davis) writes: > On 02 May 1999 15:00:44 -0400, Lloyd Zusman <l...@asfast.com> > wrote: > >I'd be happy to supply a patch, if no one else wants to do this. > > Here is a patch: > > [ ... ] Works great! My public thanks to you ... -- Lloyd Zusman l...@asfast.com
Re: [slrn] [repost] Command-line option request for slrnpull
Author: da... John E. Davis
Date: Sun, 02 May 1999 00:00
Date: Sun, 02 May 1999 00:00
83 lines
2797 bytes
2797 bytes
On 02 May 1999 15:00:44 -0400, Lloyd Zusman <l...@asfast.com>
wrote:
>I'd be happy to supply a patch, if no one else wants to do this.
Here is a patch:
--- slrnpull.c~ Sun Apr 25 03:03:22 1999
+++ slrnpull.c Sun May 2 16:56:03 1999
@@ -1695,16 +1695,16 @@
static void init_signals (void);
-static void open_log_files (void) /*{{{*/
+static void open_log_files (char *logfile) /*{{{*/
{
char file [SLRN_MAX_PATH_LEN + 1];
ELog_Fp = stderr;
MLog_Fp = stdout;
- if (-1 == slrn_dircat (SlrnPull_Dir, SLRNPULL_LOGFILE, file))
+ if (-1 == slrn_dircat (SlrnPull_Dir, logfile, file))
return;
-
+
MLog_Fp = fopen (file, "a");
if (MLog_Fp == NULL)
{
@@ -1743,6 +1743,7 @@
--no-post Do not post news\n\
--new-groups Get new groups\n\
--version Show version number\n\
+ --logfile FILE Use FILE as the log file\n\
",
pgm, pgm);
close_log_files ();
@@ -1783,7 +1784,8 @@
int post_mode;
int check_new_groups = 0;
char *dir;
-
+ char *logfile;
+
pgm = argv[0];
argv++; argc--;
@@ -1793,6 +1795,7 @@
MLog_Fp = stdout;
ELog_Fp = stderr;
+ logfile = SLRNPULL_LOGFILE;
dir = getenv ("SLRNPULL_ROOT");
@@ -1825,6 +1828,11 @@
check_new_groups = 1;
else if (!strcmp (arg, "--version"))
show_version (pgm);
+ else if (!strcmp (arg, "--logfile") && (argc > 0))
+ {
+ logfile = *argv;
+ argv++; argc--;
+ }
else usage (pgm);
}
@@ -1837,7 +1845,7 @@
return 1;
}
- open_log_files ();
+ open_log_files (logfile);
if (expire_mode)
log_message ("slrnpull started in expire mode.");
--
John E. Davis Center for Space Research/AXAF Science Center
617-258-8119 One Hampshire St., Building NE80-6019
http://space.mit.edu/~davis Cambridge, MA 02139-4307
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads