mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-08-30 14:56:17 +00:00
add env for log folder XUI_LOG_FOLDER
This commit is contained in:
parent
243aa8a5ae
commit
5b45b53696
2 changed files with 9 additions and 0 deletions
|
@ -280,6 +280,7 @@ Reference syntax:
|
||||||
| XUI_DEBUG | `boolean` | `false` |
|
| XUI_DEBUG | `boolean` | `false` |
|
||||||
| XUI_BIN_FOLDER | `string` | `"bin"` |
|
| XUI_BIN_FOLDER | `string` | `"bin"` |
|
||||||
| XUI_DB_FOLDER | `string` | `"/etc/x-ui"` |
|
| XUI_DB_FOLDER | `string` | `"/etc/x-ui"` |
|
||||||
|
| XUI_LOG_FOLDER | `string` | `"/var/log"` |
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
|
|
|
@ -65,3 +65,11 @@ func GetDBFolderPath() string {
|
||||||
func GetDBPath() string {
|
func GetDBPath() string {
|
||||||
return fmt.Sprintf("%s/%s.db", GetDBFolderPath(), GetName())
|
return fmt.Sprintf("%s/%s.db", GetDBFolderPath(), GetName())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func GetLogFolder() string {
|
||||||
|
logFolderPath := os.Getenv("XUI_LOG_FOLDER")
|
||||||
|
if logFolderPath == "" {
|
||||||
|
logFolderPath = "/var/log"
|
||||||
|
}
|
||||||
|
return logFolderPath
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue