rs / zerolog

Zero Allocation JSON Logger
MIT License
10.41k stars 567 forks source link

SetGlobalLevel for instance #466

Open cupcakearmy opened 2 years ago

cupcakearmy commented 2 years ago

Hey there! Is there any way to set a specific logging level for single logger instances?

eclaus commented 2 years ago

IIAC, you cannot change the minimum level of an existing logger instance. parentLogger.Level(<min_level>) returns a child logger with the minimum accepted level; it is a cheap operation.