LexLeo 0.0.0-dev+f8e5087-dirty
Technical documentation
Loading...
Searching...
No Matches
cli_log_path_linux.c
Go to the documentation of this file.
1/* SPDX-License-Identifier: GPL-3.0-or-later
2 * Copyright (C) 2026 Sylvain Labopin
3 */
4
6
8
10
11bool cli_resolve_default_log_path(char *buf, size_t buf_size)
12{
13 if (!buf || buf_size == 0)
14 return false;
15
16 const char *home = getenv("HOME");
17 if (!home || !*home)
18 return false;
19
20 int ret =
22 buf,
23 buf_size,
24 "%s/.local/state/lexleo/lexleo.log",
25 home
26 );
27
28 if (ret < 0 || (size_t)ret >= buf_size)
29 return false;
30
31 return true;
32}
bool cli_resolve_default_log_path(char *buf, size_t buf_size)
int osal_snprintf(char *str, size_t size, const char *fmt,...)
Definition osal_stdio.c:95