Skip to content

Commit

Permalink
logging: mention -v and rename log file
Browse files Browse the repository at this point in the history
Previously, the log file written to by fvwm3 used to contain the pid in
the file name.  This isn't useful, and since the log file is opened in
append mode anyway, it makes more sense to remove this.

Also added a description to the man page.

Helps with fvwmorg#77
  • Loading branch information
ThomasAdam authored and mikeandmore committed Nov 28, 2020
1 parent 912475f commit 2d32ef6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 6 additions & 0 deletions doc/fvwm/options.xml
Original file line number Diff line number Diff line change
Expand Up @@ -367,5 +367,11 @@ internal debugging and should only be used by developers.</para>

</listitem>
</varlistentry>
<varlistentry>
<term><option>-v</option></term>
<listitem>
<para>Enables debug logging. Write to ~/fvwm3-output.log in append mode.</para>
</listitem>
</varlistentry>
</variablelist>
</section>
4 changes: 1 addition & 3 deletions libs/log.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,13 @@ log_set_level(int ll)
void
log_open(void)
{
char *path;
char *path = "fvwm3-output.log";

if (log_level == 0)
return;
log_close();

xasprintf(&path, "fvwm3-%ld.log", (long)getpid());
log_file = fopen(path, "a");
free(path);
if (log_file == NULL)
return;

Expand Down

0 comments on commit 2d32ef6

Please sign in to comment.