All fields

“Logging” in Information Technology

97 questions across 13 technologies.

Information Technology

97 questions in 13 technologies

#QuestionTechnologyTopicLevel
1What are Python's five standard logging severity levels, from lowest to highest? Python › LoggingPythonLoggingBeginner
2What does logging.basicConfig() do, and what are its common pitfalls? Python › LoggingPythonLoggingBeginner
3What is the relationship between Logger, Handler, Formatter, and Filter in the logging module? Python › LoggingPythonLoggingIntermediate
4Why is it recommended to use logging.getLogger(__name__) instead of the root logger in library and module code? Python › LoggingPythonLoggingIntermediate
5How do you configure logging using a dictionary via logging.config.dictConfig? Python › LoggingPythonLoggingIntermediate
6How does logging.NullHandler help library authors avoid the 'No handlers could be found' warning? Python › LoggingPythonLoggingAdvanced
7Why should you use the logging module instead of print() for diagnostic output? Python › LoggingPythonLoggingBeginner
8Why is logging generally considered thread-safe, and what should you still be careful about in multiprocessing? Python › LoggingPythonLoggingAdvanced
9How would you write a custom logging.Filter to redact sensitive data like passwords from log messages? Python › LoggingPythonLoggingAdvanced
10Why is structured (JSON) logging generally preferred over plain-text console.log() statements in a production Node.js application? Node.js › Logging & MonitoringNode.jsLogging & MonitoringBeginner
11How is Logging handled in .NET Core? .NET Core › Logging in .NET Core.NET CoreLogging in .NET CoreBeginner
12What is an APM (Application Performance Monitoring) tool, and what capabilities does it typically add beyond basic logging? Node.js › Logging & MonitoringNode.jsLogging & MonitoringIntermediate
13How do you use the traceback module to capture and format a full exception traceback as a string, useful for logging? Python › Debugging & ProfilingPythonDebugging & ProfilingIntermediate
14What is Application Insights (or OpenTelemetry) integration, and what value does it add over basic logging? .NET › Diagnostics & Performance.NETDiagnostics & PerformanceIntermediate
15How does the Generic Host integrate configuration, logging, and dependency injection into a single unified builder? .NET › Generic Host.NETGeneric HostIntermediate
16How would you exclude health check endpoints from other cross-cutting middleware like authentication, logging, or rate limiting that shouldn't apply to frequent automated health polling? ASP.NET Core › Health ChecksASP.NET CoreHealth ChecksIntermediate
17What is the risk of exposing a raw error's stack trace in an API response, and how do you prevent it while still logging full details server-side? Node.js › Error HandlingNode.jsError HandlingIntermediate
18What is the DEBUG environment variable convention (popularized by the 'debug' npm package), and how does it let you enable verbose logging selectively? Node.js › Debugging & DiagnosticsNode.jsDebugging & DiagnosticsIntermediate
19What is the risk of accidentally logging or exposing environment variables that contain secrets, and how do you prevent it? Node.js › Environment Variables & ConfigurationNode.jsEnvironment Variables & ConfigurationIntermediate
20How would you use the 'logging' module's exception logging (logger.exception()) INSIDE an except block to automatically capture the full traceback? Python › Debugging & ProfilingPythonDebugging & ProfilingAdvanced
21How would you implement a request-logging middleware in Express that captures method, path, status code, and response time for every request? Node.js › Express & MiddlewareNode.jsExpress & MiddlewareAdvanced
22How do you use functools.partial to fix keyword arguments for logging or callback functions? Python › functools & Functional Programming ToolsPythonfunctools & Functional Programming ToolsBeginner
23How do you format log output to include the timestamp, logger name, level, and message? Python › LoggingPythonLoggingBeginner
24What's the difference between propagate=True and propagate=False on a logger? Python › LoggingPythonLoggingIntermediate
25How can an organization consolidate CloudTrail logging across multiple AWS accounts using AWS Organizations? AWS › AWS CloudTrail & AuditingAWSAWS CloudTrail & AuditingIntermediate
26What logging and observability practices suit a MAUI app? .NET MAUI › Best Practices & Architecture.NET MAUIBest Practices & ArchitectureAdvanced
27What logging and observability practices suit a MAUI app? .NET MAUI › Best Practices & Architecture.NET MAUIBest Practices & ArchitectureAdvanced
28What is 'exception filtering with side effects' and why is it considered a controversial but sometimes useful technique for logging? C# › Exception HandlingC#Exception HandlingAdvanced
29How would you implement a function that dynamically inspects its own call arguments at runtime using the 'inspect' module, useful for building generic validation or logging decorators? Python › Functions & ScopePythonFunctions & ScopeAdvanced
30How does gRPC support interceptors for cross-cutting concerns like authentication, logging, and retries, similar to middleware in a REST pipeline? .NET › gRPC Services.NETgRPC ServicesAdvanced
31How would you use the Chain of Responsibility pattern to implement a request-processing pipeline (such as middleware-style validation/authentication/logging), and how does this relate conceptually to servlet filters or web framework middleware? Java › Design Patterns in JavaJavaDesign Patterns in JavaAdvanced
32How would you write an end to end test that checks a full user flow across multiple pages, such as logging in and viewing a dashboard? React › TestingReactTestingAdvanced
33How would you build a centralized, reusable error logging procedure that captures detailed error information whenever it is called from within a CATCH block? SQL Server › Error Handling with TRY CATCHSQL ServerError Handling with TRY CATCHAdvanced
34How can you use Flutter DevTools' dedicated network view together with proper logging to effectively debug a genuinely complex issue involving several separate related API calls happening across your application? Flutter › Flutter DevTools & DebuggingFlutterFlutter DevTools & DebuggingAdvanced
35How should you properly implement request and response logging for debugging purposes, while genuinely and carefully ensuring genuinely sensitive data, such as an authentication token or a password, is never actually accidentally logged in plain readable text? Flutter › Networking with HTTP & DioFlutterNetworking with HTTP & DioAdvanced
36How do you include structured context (like a request ID) in every log message using LoggerAdapter or extra? Python › LoggingPythonLoggingIntermediate
37What's the danger of using %-style, f-string, or .format() interpolation directly in a log call's message argument versus lazy % substitution? Python › LoggingPythonLoggingIntermediate
38How do RotatingFileHandler and TimedRotatingFileHandler prevent log files from growing unbounded? Python › LoggingPythonLoggingAdvanced
39How does logger.exception() differ from logger.error(), and when should you use it? Python › LoggingPythonLoggingAdvanced
40What is log level (debug, info, warn, error), and how do you configure a logger like Pino or Winston to filter output by level per environment? Node.js › Logging & MonitoringNode.jsLogging & MonitoringIntermediate
41How would you implement request correlation IDs to trace a single request's logs across multiple log lines and services? Node.js › Logging & MonitoringNode.jsLogging & MonitoringIntermediate
42How would you implement distributed tracing across multiple Node.js microservices using OpenTelemetry? Node.js › Logging & MonitoringNode.jsLogging & MonitoringAdvanced
43What tools does .NET provide for basic application diagnostics, and what is dotnet-trace used for? .NET › Diagnostics & Performance.NETDiagnostics & PerformanceBeginner
44What does the ReportApiVersions option do, and what response headers does it add? ASP.NET Core › API VersioningASP.NET CoreAPI VersioningBeginner
45What are MVC filters in ASP.NET Core, and what are the main filter types in the pipeline (authorization, resource, action, exception, result)? ASP.NET Core › FiltersASP.NET CoreFiltersBeginner
46How do you exclude a globally-registered filter from running on one specific action or controller? ASP.NET Core › FiltersASP.NET CoreFiltersBeginner
47What problem does PM2 solve for running a Node.js application in production, beyond just executing 'node server.js'? Node.js › Deployment & Process Managers (PM2)Node.jsDeployment & Process Managers (PM2)Beginner
48How does the tracemalloc module help track where memory is being allocated in a running program? Python › Memory Management & Garbage CollectionPythonMemory Management & Garbage CollectionIntermediate
49How does the HttpContext object serve as the shared state carrier through the middleware pipeline? .NET › ASP.NET Core Middleware & Request Pipeline.NETASP.NET Core Middleware & Request PipelineIntermediate
50How should exceptions be handled inside a BackgroundService's ExecuteAsync loop to prevent the entire service from crashing silently? .NET › Background Services.NETBackground ServicesIntermediate
51How would you implement a scheduled (cron-like) background job in .NET without a third-party library? .NET › Background Services.NETBackground ServicesIntermediate
52How does appsettings.{Environment}.json layering work, and how is the current environment determined? .NET › Configuration & Options.NETConfiguration & OptionsIntermediate
53How does the command-line configuration provider let you override settings via arguments when running an application? .NET › Configuration & Options.NETConfiguration & OptionsIntermediate
54How does ASP.NET Core's DI container support injecting a logger via ILogger<T>, and how is the generic type parameter used? .NET › Dependency Injection.NETDependency InjectionIntermediate
55How does dotnet-counters provide live performance monitoring, and what key metrics does it expose by default? .NET › Diagnostics & Performance.NETDiagnostics & PerformanceIntermediate
56How do you register configuration and services differently for a Worker Service running as a Windows Service or systemd daemon? .NET › Generic Host.NETGeneric HostIntermediate
57How do you configure a sunset date for a deprecated API version so clients receive a clear removal timeline? ASP.NET Core › API VersioningASP.NET CoreAPI VersioningIntermediate
58How should exceptions be handled inside a BackgroundService's work loop to prevent one failure from silently stopping all future processing? ASP.NET Core › Background Tasks & Hosted ServicesASP.NET CoreBackground Tasks & Hosted ServicesIntermediate
59How does appsettings.{Environment}.json layering work, and how does ASP.NET Core determine the current environment? ASP.NET Core › Configuration & Options PatternASP.NET CoreConfiguration & Options PatternIntermediate
60How does the command-line configuration provider let you override settings via arguments when running an application, and what's its precedence? ASP.NET Core › Configuration & Options PatternASP.NET CoreConfiguration & Options PatternIntermediate
61How do you customize the JSON response format of the health check endpoint, since the default output is just plain text status? ASP.NET Core › Health ChecksASP.NET CoreHealth ChecksIntermediate
62What is the purpose of overriding toString(), and what's the difference between Object's default implementation and a well-designed custom one? Java › equals(), hashCode() & toString() ContractsJavaequals(), hashCode() & toString() ContractsIntermediate
63What is a common anti-pattern with catching exceptions too broadly (catch (Exception e) or worse, catch (Throwable t)), and why is it generally discouraged? Java › ExceptionsJavaExceptionsIntermediate
64What is the purpose of the addSuppressed() mechanism and getSuppressed() method on Throwable, and in what specific scenario does the JVM automatically populate suppressed exceptions? Java › ExceptionsJavaExceptionsIntermediate
65What is the purpose of the PrintStream and PrintWriter classes (like System.out), and how do they differ from lower-level OutputStream/Writer in their exception-handling behavior? Java › I/O & NIOJavaI/O & NIOIntermediate
66What is the difference between fs.appendFile() and opening a file with the 'a' flag and writing to it manually? Node.js › File System & File ProcessingNode.jsFile System & File ProcessingIntermediate
67What is process.memoryUsage(), and how would you use it to monitor a Node.js application's memory consumption? Node.js › Global Objects & the process ObjectNode.jsGlobal Objects & the process ObjectIntermediate
68What are Filters in ASP.NET Core MVC? .NET Core › MVC Filters.NET CoreMVC FiltersIntermediate
69How do EventCounters and the newer System.Diagnostics.Metrics API (Meter) let you expose custom application-specific performance metrics? .NET › Diagnostics & Performance.NETDiagnostics & PerformanceAdvanced
70How would you optimize an EF Core query that's generating inefficient SQL, and what tools help identify the actual generated SQL? .NET › Entity Framework Core & Data Access.NETEntity Framework Core & Data AccessAdvanced
71What information should be excluded from error responses in production to avoid leaking sensitive implementation details? .NET › Global Exception Handling & Middleware.NETGlobal Exception Handling & MiddlewareAdvanced
72How would you implement custom middleware to catch and log unhandled exceptions before they reach the exception handler, adding request-specific context? .NET › Global Exception Handling & Middleware.NETGlobal Exception Handling & MiddlewareAdvanced
73How do you deprecate an API version gracefully, notifying consumers via response headers before eventually removing it? ASP.NET Core › API VersioningASP.NET CoreAPI VersioningAdvanced
74How would you implement passwordless authentication (like a magic link sent via email) in ASP.NET Core? ASP.NET Core › AuthenticationASP.NET CoreAuthenticationAdvanced
75How would you implement a cron-like scheduled background job (e.g., 'run daily at 2 AM') without a third-party scheduling library? ASP.NET Core › Background Tasks & Hosted ServicesASP.NET CoreBackground Tasks & Hosted ServicesAdvanced
76How would you monitor and measure cache effectiveness (hit rate) in a production ASP.NET Core application to validate a caching strategy is actually helping? ASP.NET Core › CachingASP.NET CoreCachingAdvanced
77What information should be excluded from error responses in production to avoid leaking sensitive implementation details? ASP.NET Core › Error HandlingASP.NET CoreError HandlingAdvanced
78How would you implement a health check that reports Degraded (rather than a binary Healthy/Unhealthy) based on a performance threshold, like elevated database query latency? ASP.NET Core › Health ChecksASP.NET CoreHealth ChecksAdvanced
79How would you integrate health check results with the AspNetCore.HealthChecks.UI package to get a persistent, historical dashboard view of health status over time? ASP.NET Core › Health ChecksASP.NET CoreHealth ChecksAdvanced
80How would you design a health check for a service with multiple independent downstream dependencies where you want the overall status to reflect the worst individual result, but also need each dependency's specific status individually visible for diagnostics? ASP.NET Core › Health ChecksASP.NET CoreHealth ChecksAdvanced
81How does exception chaining (via the cause mechanism, initCause() or a constructor accepting a Throwable) preserve the original root-cause exception when wrapping and rethrowing a different exception type, and why does this matter for debugging? Java › ExceptionsJavaExceptionsAdvanced
82How would you implement a custom checked exception that requires additional context to be attached as the exception propagates up multiple layers of a call stack, without losing information at each layer? Java › ExceptionsJavaExceptionsAdvanced
83How would you design and implement a global, centralized exception-handling strategy for a Java application (such as a top-level handler in main(), or an uncaught exception handler for background threads), ensuring no exception silently crashes the application without being logged? Java › ExceptionsJavaExceptionsAdvanced
84How does the Instant class represent a point in time, and how does it differ fundamentally from ZonedDateTime in terms of what it actually represents and how it should be used? Java › Java Date & Time API (java.time)JavaJava Date & Time API (java.time)Advanced
85What is the AsyncLocalStorage API, and what problem does it solve for tracking context across asynchronous calls? Node.js › Advanced Node.jsNode.jsAdvanced Node.jsAdvanced
86What is monkey-patching in the context of Node.js APM (Application Performance Monitoring) tools, and what are its risks? Node.js › Advanced Node.jsNode.jsAdvanced Node.jsAdvanced
87What is the node:diagnostics_channel module, and how does it differ from simply emitting a custom event? Node.js › Advanced Node.jsNode.jsAdvanced Node.jsAdvanced
88What is a dead-letter queue (DLQ), and how should a Node.js job-processing system use one? Node.js › Background Jobs & QueuesNode.jsBackground Jobs & QueuesAdvanced
89What is a canary release, and how does it reduce the blast radius of a risky Node.js deployment? Node.js › Cloud & DevOpsNode.jsCloud & DevOpsAdvanced
90What is observability (as distinct from traditional monitoring), and what are its three commonly cited pillars? Node.js › Cloud & DevOpsNode.jsCloud & DevOpsAdvanced
91What is error wrapping (or error chaining), and how does the Error class's 'cause' property support it in modern Node.js? Node.js › Error HandlingNode.jsError HandlingAdvanced
92How would you implement automatic error reporting to a service like Sentry in a Node.js application, and what data should be scrubbed before sending? Node.js › Error HandlingNode.jsError HandlingAdvanced
93How would you use async_hooks (the lower-level predecessor to AsyncLocalStorage) to trace the lifecycle of asynchronous resources in Node.js? Node.js › Event Loop & Non-blocking IONode.jsEvent Loop & Non-blocking IOAdvanced
94How would you implement a middleware that adds a correlation/request ID to every incoming request for tracing purposes across a distributed system? Node.js › Express & MiddlewareNode.jsExpress & MiddlewareAdvanced
95How does PM2's built-in log management work, and how would you configure log rotation to prevent log files from growing unbounded? Node.js › Deployment & Process Managers (PM2)Node.jsDeployment & Process Managers (PM2)Advanced
96What does PM2's built-in monitoring dashboard (pm2 monit, or PM2 Plus) show, and what metrics are most useful for production operations? Node.js › Deployment & Process Managers (PM2)Node.jsDeployment & Process Managers (PM2)Advanced
97How would you implement a dead-letter exchange in RabbitMQ to handle messages that repeatedly fail processing? Node.js › Message Queues (RabbitMQ & Kafka)Node.jsMessage Queues (RabbitMQ & Kafka)Advanced