switched to log from logging
This commit is contained in:
parent
9065937d2c
commit
24680e403d
6 changed files with 44 additions and 34 deletions
|
|
@ -101,8 +101,13 @@ export function getServiceConfig() {
|
|||
return getConfig().service;
|
||||
}
|
||||
|
||||
export function getLogConfig() {
|
||||
return getConfig().log;
|
||||
}
|
||||
|
||||
// Deprecated alias for backward compatibility
|
||||
export function getLoggingConfig() {
|
||||
return getConfig().logging;
|
||||
return getConfig().log;
|
||||
}
|
||||
|
||||
export function getProviderConfig(provider: string) {
|
||||
|
|
|
|||
|
|
@ -174,8 +174,12 @@ export class EnvLoader implements ConfigLoader {
|
|||
'NAME': ['name'],
|
||||
'VERSION': ['version'],
|
||||
|
||||
// Logging mappings
|
||||
'LOG_LEVEL': ['logging', 'level'],
|
||||
// Log mappings (using LOG_ prefix for all)
|
||||
'LOG_LEVEL': ['log', 'level'],
|
||||
'LOG_FORMAT': ['log', 'format'],
|
||||
'LOG_LOKI_ENABLED': ['log', 'loki', 'enabled'],
|
||||
'LOG_LOKI_HOST': ['log', 'loki', 'host'],
|
||||
'LOG_LOKI_PORT': ['log', 'loki', 'port'],
|
||||
|
||||
// Special mappings to avoid conflicts
|
||||
'DEBUG_MODE': ['debug'],
|
||||
|
|
|
|||
|
|
@ -70,8 +70,8 @@ const flexibleDatabaseConfigSchema = z.object({
|
|||
}).default({}),
|
||||
}).default({});
|
||||
|
||||
// Flexible logging schema with defaults
|
||||
const flexibleLoggingConfigSchema = z.object({
|
||||
// Flexible log schema with defaults (renamed from logging)
|
||||
const flexibleLogConfigSchema = z.object({
|
||||
level: z.enum(['trace', 'debug', 'info', 'warn', 'error', 'fatal']).default('info'),
|
||||
format: z.enum(['json', 'pretty']).default('json'),
|
||||
loki: z.object({
|
||||
|
|
@ -86,7 +86,7 @@ const flexibleLoggingConfigSchema = z.object({
|
|||
export const appConfigSchema = baseConfigSchema.extend({
|
||||
environment: environmentSchema.default('development'),
|
||||
service: flexibleServiceConfigSchema,
|
||||
logging: flexibleLoggingConfigSchema,
|
||||
log: flexibleLogConfigSchema,
|
||||
database: flexibleDatabaseConfigSchema,
|
||||
queue: queueConfigSchema.optional(),
|
||||
http: httpConfigSchema.optional(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue