diff --git a/config.go b/config.go index 41661e5..50abd3f 100644 --- a/config.go +++ b/config.go @@ -107,6 +107,7 @@ func parseConfig(cmd *cobra.Command) { config.AppendToFile = getStringCfgVal("append-to-file", prefix+"APPEND_TO_FILE", cmd) config.AppendToFileRotateMaxSize = getStringCfgVal("rotate-file-size", prefix+"ROTATE_FILE_SIZE", cmd) config.ApiKey = getStringCfgVal("api-key", prefix+"API_KEY", cmd) + config.HttpPathPrefix = getStringCfgVal("ui-path", prefix+"UI_PATH", cmd) config.BulkWindowMs = getIntCfgVal("bulk-window", cmd) config.MaxMessageCount = getIntCfgVal("max-message-count", cmd) diff --git a/main.go b/main.go index ffcdf9f..6073cad 100644 --- a/main.go +++ b/main.go @@ -202,6 +202,7 @@ func init() { rootCmd.PersistentFlags().StringP("port", "p", "8080", "Port on which the Web UI will be served (env: LOGDY_PORT)") rootCmd.PersistentFlags().StringP("ui-ip", "", "127.0.0.1", "Bind Web UI server to a specific IP address (env: LOGDY_UI_IP)") + rootCmd.PersistentFlags().StringP("ui-path", "", "", "Bind WEB UI server to a specific subpath (env: LOGDY_UI_PATH)") rootCmd.PersistentFlags().StringP("ui-pass", "", "", "Password that will be used to authenticate in the UI (env: LOGDY_UI_PASS)") rootCmd.PersistentFlags().StringP("config", "", "", "Path to a file where a config (json) for the UI is located (env: LOGDY_CONFIG)") rootCmd.PersistentFlags().StringP("append-to-file", "", "", "Path to a file where message logs will be appended, the file will be created if it doesn't exist (env: LOGDY_APPEND_TO_FILE)")