Skip to content

Commit 9dc6002

Browse files
committed
[#107] add --ui-path option
- introduced --ui-path CLI option to specify a subpath (e.g., /path). - update help documentation on --ui-path
1 parent 3d870d9 commit 9dc6002

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

config.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ func parseConfig(cmd *cobra.Command) {
107107
config.AppendToFile = getStringCfgVal("append-to-file", prefix+"APPEND_TO_FILE", cmd)
108108
config.AppendToFileRotateMaxSize = getStringCfgVal("rotate-file-size", prefix+"ROTATE_FILE_SIZE", cmd)
109109
config.ApiKey = getStringCfgVal("api-key", prefix+"API_KEY", cmd)
110+
config.HttpPathPrefix = getStringCfgVal("ui-path", prefix+"UI_PATH", cmd)
110111

111112
config.BulkWindowMs = getIntCfgVal("bulk-window", cmd)
112113
config.MaxMessageCount = getIntCfgVal("max-message-count", cmd)

main.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ func init() {
202202

203203
rootCmd.PersistentFlags().StringP("port", "p", "8080", "Port on which the Web UI will be served (env: LOGDY_PORT)")
204204
rootCmd.PersistentFlags().StringP("ui-ip", "", "127.0.0.1", "Bind Web UI server to a specific IP address (env: LOGDY_UI_IP)")
205+
rootCmd.PersistentFlags().StringP("ui-path", "", "", "Bind WEB UI server to a specific subpath (env: LOGDY_UI_PATH)")
205206
rootCmd.PersistentFlags().StringP("ui-pass", "", "", "Password that will be used to authenticate in the UI (env: LOGDY_UI_PASS)")
206207
rootCmd.PersistentFlags().StringP("config", "", "", "Path to a file where a config (json) for the UI is located (env: LOGDY_CONFIG)")
207208
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)")

0 commit comments

Comments
 (0)