Demonstrate different log levels in action.
()
| 175 | |
| 176 | |
| 177 | def demo_log_levels(): |
| 178 | """Demonstrate different log levels in action.""" |
| 179 | print("=" * 60) |
| 180 | print("LOG LEVELS DEMONSTRATION") |
| 181 | print("=" * 60) |
| 182 | |
| 183 | print("Simulating application startup:") |
| 184 | info("Application starting up") |
| 185 | step("Initializing modules") |
| 186 | ok("Core modules loaded") |
| 187 | step("Starting services") |
| 188 | warn("Service A started with reduced performance mode") |
| 189 | ok("Service B started normally") |
| 190 | err("Service C failed to start") |
| 191 | dim(" Fallback: Using Service D instead") |
| 192 | ok("Service D started successfully") |
| 193 | info("Application startup complete") |
| 194 | |
| 195 | print("\nSimulating application shutdown:") |
| 196 | info("Shutting down application") |
| 197 | step("Stopping services") |
| 198 | ok("All services stopped cleanly") |
| 199 | step("Cleaning up resources") |
| 200 | ok("Resources cleaned up") |
| 201 | info("Application shutdown complete") |
| 202 | |
| 203 | print() |
| 204 | |
| 205 | |
| 206 | def main(): |