Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(log): prepare for noUncheckedIndexedAccess #4042

Merged
merged 1 commit into from
Dec 30, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
refactor(log): handle noUncheckedIndexedAccess for log
  • Loading branch information
syhol committed Dec 30, 2023
commit bfc0d71f098947204cb64eb8e345cd917fb8d7ea
6 changes: 2 additions & 4 deletions log/mod.ts
Original file line number Diff line number Diff line change
@@ -565,8 +565,7 @@ export function setup(config: LogConfig) {
// setup handlers
const handlers = state.config.handlers || {};

for (const handlerName in handlers) {
const handler = handlers[handlerName];
for (const [handlerName, handler] of Object.entries(handlers)) {
handler.setup();
state.handlers.set(handlerName, handler);
}
@@ -576,8 +575,7 @@ export function setup(config: LogConfig) {

// setup loggers
const loggers = state.config.loggers || {};
for (const loggerName in loggers) {
const loggerConfig = loggers[loggerName];
for (const [loggerName, loggerConfig] of Object.entries(loggers)) {
const handlerNames = loggerConfig.handlers || [];
const handlers: BaseHandler[] = [];