Skip to content

Commit

Permalink
feat(messaging): expose LOGGING_ENABLED (#11656)
Browse files Browse the repository at this point in the history
* Allow to set LOGGING_ENABLED and SUPPRESS_LOGGING

* add docs

* use core_env

* removed MESSAGING_SUPPRESS_LOGGING
  • Loading branch information
davidvitora committed Mar 23, 2022
1 parent 665bf93 commit e30b90d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/bp/src/orchestrator/messaging-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export const startMessagingServer = async (opts: Partial<MessagingServerOptions>
REDIS_URL: process.core_env.REDIS_URL,
REDIS_SCOPE: process.core_env.BP_REDIS_SCOPE,
REDIS_OPTIONS: process.env.REDIS_OPTIONS,
LOGGING_ENABLED: 'false',
LOGGING_ENABLED: process.core_env.MESSAGING_LOGGING_ENABLED || 'false',
SKIP_LOAD_ENV: 'true',
SKIP_LOAD_CONFIG: 'true',
SPINNED: 'true',
Expand Down
5 changes: 5 additions & 0 deletions packages/bp/src/typings/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@ declare interface BotpressEnvironmentVariables {
/** The URL used to reach an external Messaging server */
readonly MESSAGING_ENDPOINT?: string

/** Messaging server should start with logging enabled
* @default false
*/
readonly MESSAGING_LOGGING_ENABLED?: boolean

/** Admin key of the messaging server to make calls to admin routes */
readonly MESSAGING_ADMIN_KEY?: string

Expand Down

0 comments on commit e30b90d

Please sign in to comment.