(options = {})
| 962 | * @returns {Record<string, string>} Logging env vars for the backend process |
| 963 | */ |
| 964 | export function buildBackendLogEnv(options = {}) { |
| 965 | const { verbose = false, automation = false, env = process.env } = options; |
| 966 | const level = backendLogLevel({ verbose, env }); |
| 967 | |
| 968 | return { |
| 969 | LOG_LEVEL: level, |
| 970 | ...(automation |
| 971 | ? { |
| 972 | AUTOMATION_LOG_LEVEL: verbose |
| 973 | ? "DEBUG" |
| 974 | : env.AUTOMATION_LOG_LEVEL || level, |
| 975 | } |
| 976 | : {}), |
| 977 | }; |
| 978 | } |
| 979 | |
| 980 | /** |
| 981 | * Build the environment variables object for spawning the agent-server process. |
no test coverage detected