1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-03 16:23:14 +02:00

core: fix write of weechat.log to stdout with weechat-headless --stdout (closes #2247)

This commit is contained in:
Sébastien Helleu
2025-04-15 08:11:39 +02:00
parent 0835d043de
commit 41f96c6494
2 changed files with 13 additions and 11 deletions
+1
View File
@@ -4,6 +4,7 @@
### Fixed
- core: fix write of weechat.log to stdout with `weechat-headless --stdout` ([#2247](https://github.com/weechat/weechat/issues/2247))
- core: add refresh of window title on buffer switch, when option weechat.look.window_title is set
- core: consider all keys are safe in cursor context ([#2244](https://github.com/weechat/weechat/issues/2244))
- irc: display nick changes and quit messages when option irc.look.ignore_tag_messages is enabled ([#2241](https://github.com/weechat/weechat/issues/2241))
+12 -11
View File
@@ -72,21 +72,22 @@ log_open (const char *filename, const char *mode)
{
weechat_log_file = stdout;
}
else if (filename)
{
weechat_log_filename = strdup (filename);
}
else
{
string_asprintf (&weechat_log_filename,
"%s/%s", weechat_state_dir, WEECHAT_LOG_NAME);
if (filename)
{
weechat_log_filename = strdup (filename);
}
else
{
string_asprintf (&weechat_log_filename,
"%s/%s", weechat_state_dir, WEECHAT_LOG_NAME);
}
if (!weechat_log_filename)
return 0;
weechat_log_file = fopen (weechat_log_filename, mode);
}
if (!weechat_log_filename)
return 0;
weechat_log_file = fopen (weechat_log_filename, mode);
if (!weechat_log_file)
{
if (weechat_log_filename)