mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
log: fix window size when running inside docker, CI or debugger
This commit is contained in:
parent
63021392d4
commit
76073cddcf
1 changed files with 7 additions and 1 deletions
|
@ -157,7 +157,13 @@ int log_init(struct log *l, int level, long facilitites)
|
|||
return ret;
|
||||
|
||||
/* Try to get initial window size */
|
||||
ioctl(STDERR_FILENO, TIOCGWINSZ, &global_log->window);
|
||||
ioctl(STDERR_FILENO, TIOCGWINSZ, &l->window);
|
||||
|
||||
/* Fallback if for some reason we can not determine a prober window size */
|
||||
if (l->window.ws_col == 0)
|
||||
l->window.ws_col = 150;
|
||||
if (l->window.ws_row == 0)
|
||||
l->window.ws_row = 50;
|
||||
}
|
||||
else {
|
||||
l->window.ws_col = LOG_WIDTH;
|
||||
|
|
Loading…
Add table
Reference in a new issue