[{"data":1,"prerenderedAt":5481},["ShallowReactive",2],{"tutorials-python-how-to":3,"category-items-python-how-to":600,"content-/python-how-to/use-logging":601},[4,22,31,40,49,58,67,76,86,94,103,112,121,130,139,148,158,167,176,185,194,203,212,222,231,240,249,258,267,276,285,297,306,315,324,333,342,351,362,371,380,389,398,407,418,427,436,445,454,463,472,483,492,501,510,519,528,539,548,557,566,575,584,593],{"_path":5,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":9,"description":10,"slug":11,"order":12,"isParent":13,"icon":14,"_type":15,"_id":16,"_source":17,"_file":18,"_stem":19,"_extension":20,"children":21,"expanded":13},"/python-how-to/string-manipulation","python-how-to",false,"","String Manipulation","Learn essential string manipulation techniques in Python","string-manipulation",1,true,"pi pi-folder","markdown","content:python-how-to:1.string-manipulation.md","content","python-how-to/1.string-manipulation.md","python-how-to/1.string-manipulation","md",[22,31,40,49,58,67],{"_path":23,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":24,"description":25,"slug":26,"parentId":5,"order":27,"_type":15,"_id":28,"_source":17,"_file":29,"_stem":30,"_extension":20},"/python-how-to/split-join-strings","Split and Join Strings","Learn how to split strings into lists and join lists back into strings in Python","split-join-strings",2,"content:python-how-to:2.split-join-strings.md","python-how-to/2.split-join-strings.md","python-how-to/2.split-join-strings",{"_path":32,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":33,"description":34,"slug":35,"parentId":5,"order":36,"_type":15,"_id":37,"_source":17,"_file":38,"_stem":39,"_extension":20},"/python-how-to/remove-whitespace","Remove Whitespace","Learn how to clean up and remove unwanted whitespace from strings in Python","remove-whitespace",3,"content:python-how-to:3.remove-whitespace.md","python-how-to/3.remove-whitespace.md","python-how-to/3.remove-whitespace",{"_path":41,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":42,"description":43,"slug":44,"parentId":5,"order":45,"_type":15,"_id":46,"_source":17,"_file":47,"_stem":48,"_extension":20},"/python-how-to/find-replace-text","Find and Replace Text","Learn how to search for and replace text within strings in Python","find-replace-text",4,"content:python-how-to:4.find-replace-text.md","python-how-to/4.find-replace-text.md","python-how-to/4.find-replace-text",{"_path":50,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":51,"description":52,"slug":53,"parentId":5,"order":54,"_type":15,"_id":55,"_source":17,"_file":56,"_stem":57,"_extension":20},"/python-how-to/check-string-content","Check String Content","Learn how to validate and check the content of strings in Python","check-string-content",5,"content:python-how-to:5.check-string-content.md","python-how-to/5.check-string-content.md","python-how-to/5.check-string-content",{"_path":59,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":60,"description":61,"slug":62,"parentId":5,"order":63,"_type":15,"_id":64,"_source":17,"_file":65,"_stem":66,"_extension":20},"/python-how-to/format-strings","Format Strings","Learn how to format strings in Python using f-strings and format() method","format-strings",6,"content:python-how-to:6.format-strings.md","python-how-to/6.format-strings.md","python-how-to/6.format-strings",{"_path":68,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":69,"description":70,"slug":71,"parentId":5,"order":72,"_type":15,"_id":73,"_source":17,"_file":74,"_stem":75,"_extension":20},"/python-how-to/unicode-special-chars","Handle Unicode and Special Characters","Learn how to work with Unicode and special characters in Python strings","unicode-special-chars",7,"content:python-how-to:7.unicode-special-chars.md","python-how-to/7.unicode-special-chars.md","python-how-to/7.unicode-special-chars",{"_path":77,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":78,"description":79,"slug":80,"order":81,"isParent":13,"icon":14,"_type":15,"_id":82,"_source":17,"_file":83,"_stem":84,"_extension":20,"children":85,"expanded":13},"/python-how-to/list-operations","List Operations","Learn essential operations for working with lists in Python","list-operations",8,"content:python-how-to:8.list-operations.md","python-how-to/8.list-operations.md","python-how-to/8.list-operations",[86,94,103,112,121,130,139],{"_path":87,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":88,"description":89,"slug":90,"parentId":77,"order":81,"_type":15,"_id":91,"_source":17,"_file":92,"_stem":93,"_extension":20},"/python-how-to/sort-lists","Sort Lists","Learn how to sort lists in Python using different methods and custom sorting","sort-lists","content:python-how-to:9.sort-lists.md","python-how-to/9.sort-lists.md","python-how-to/9.sort-lists",{"_path":95,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":96,"description":97,"slug":98,"parentId":77,"order":99,"_type":15,"_id":100,"_source":17,"_file":101,"_stem":102,"_extension":20},"/python-how-to/remove-duplicates","Remove Duplicates","Learn how to remove duplicate elements from lists in Python","remove-duplicates",10,"content:python-how-to:10.remove-duplicates.md","python-how-to/10.remove-duplicates.md","python-how-to/10.remove-duplicates",{"_path":104,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":105,"description":106,"slug":107,"parentId":77,"order":108,"_type":15,"_id":109,"_source":17,"_file":110,"_stem":111,"_extension":20},"/python-how-to/filter-lists","Filter Lists","Learn how to filter lists in Python using different methods","filter-lists",11,"content:python-how-to:11.filter-lists.md","python-how-to/11.filter-lists.md","python-how-to/11.filter-lists",{"_path":113,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":114,"description":115,"slug":116,"parentId":77,"order":117,"_type":15,"_id":118,"_source":17,"_file":119,"_stem":120,"_extension":20},"/python-how-to/combine-lists","Combine Lists","Learn different methods to combine lists in Python","combine-lists",12,"content:python-how-to:12.combine-lists.md","python-how-to/12.combine-lists.md","python-how-to/12.combine-lists",{"_path":122,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":123,"description":124,"slug":125,"parentId":77,"order":126,"_type":15,"_id":127,"_source":17,"_file":128,"_stem":129,"_extension":20},"/python-how-to/list-comprehensions","Use List Comprehensions","Learn how to create and transform lists efficiently using Python's list comprehension syntax","list-comprehensions",13,"content:python-how-to:13.list-comprehensions.md","python-how-to/13.list-comprehensions.md","python-how-to/13.list-comprehensions",{"_path":131,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":132,"description":133,"slug":134,"parentId":77,"order":135,"_type":15,"_id":136,"_source":17,"_file":137,"_stem":138,"_extension":20},"/python-how-to/nested-lists","Work with Nested Lists","Learn how to work with nested lists (2D arrays) in Python","nested-lists",14,"content:python-how-to:14.nested-lists.md","python-how-to/14.nested-lists.md","python-how-to/14.nested-lists",{"_path":140,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":141,"description":142,"slug":143,"parentId":77,"order":144,"_type":15,"_id":145,"_source":17,"_file":146,"_stem":147,"_extension":20},"/python-how-to/enumerate-zip","Use enumerate() and zip()","Learn how to use enumerate() and zip() for efficient iteration in Python","enumerate-zip",15,"content:python-how-to:15.enumerate-zip.md","python-how-to/15.enumerate-zip.md","python-how-to/15.enumerate-zip",{"_path":149,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":150,"description":151,"slug":152,"order":153,"isParent":13,"icon":14,"_type":15,"_id":154,"_source":17,"_file":155,"_stem":156,"_extension":20,"children":157,"expanded":13},"/python-how-to/dictionary-operations","Dictionary Operations","Learn essential operations for working with dictionaries in Python","dictionary-operations",16,"content:python-how-to:16.dictionary-operations.md","python-how-to/16.dictionary-operations.md","python-how-to/16.dictionary-operations",[158,167,176,185,194,203],{"_path":159,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":160,"description":161,"slug":162,"parentId":149,"order":163,"_type":15,"_id":164,"_source":17,"_file":165,"_stem":166,"_extension":20},"/python-how-to/merge-dictionaries","Merge Dictionaries","Learn different methods to merge dictionaries in Python","merge-dictionaries",17,"content:python-how-to:17.merge-dictionaries.md","python-how-to/17.merge-dictionaries.md","python-how-to/17.merge-dictionaries",{"_path":168,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":169,"description":170,"slug":171,"parentId":149,"order":172,"_type":15,"_id":173,"_source":17,"_file":174,"_stem":175,"_extension":20},"/python-how-to/sort-dictionaries","Sort Dictionaries","Learn how to sort dictionaries by keys or values in Python","sort-dictionaries",18,"content:python-how-to:18.sort-dictionaries.md","python-how-to/18.sort-dictionaries.md","python-how-to/18.sort-dictionaries",{"_path":177,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":178,"description":179,"slug":180,"parentId":149,"order":181,"_type":15,"_id":182,"_source":17,"_file":183,"_stem":184,"_extension":20},"/python-how-to/filter-dictionaries","Filter Dictionaries","Learn how to filter dictionaries based on keys or values in Python","filter-dictionaries",19,"content:python-how-to:19.filter-dictionaries.md","python-how-to/19.filter-dictionaries.md","python-how-to/19.filter-dictionaries",{"_path":186,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":187,"description":188,"slug":189,"parentId":149,"order":190,"_type":15,"_id":191,"_source":17,"_file":192,"_stem":193,"_extension":20},"/python-how-to/handle-missing-keys","Handle Missing Keys","Learn safe ways to access dictionary keys and handle missing values","handle-missing-keys",20,"content:python-how-to:20.handle-missing-keys.md","python-how-to/20.handle-missing-keys.md","python-how-to/20.handle-missing-keys",{"_path":195,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":196,"description":197,"slug":198,"parentId":149,"order":199,"_type":15,"_id":200,"_source":17,"_file":201,"_stem":202,"_extension":20},"/python-how-to/dictionary-comprehensions","Use Dictionary Comprehensions","Learn how to create dictionaries efficiently using comprehensions","dictionary-comprehensions",21,"content:python-how-to:21.dictionary-comprehensions.md","python-how-to/21.dictionary-comprehensions.md","python-how-to/21.dictionary-comprehensions",{"_path":204,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":205,"description":206,"slug":207,"parentId":149,"order":208,"_type":15,"_id":209,"_source":17,"_file":210,"_stem":211,"_extension":20},"/python-how-to/convert-lists-dictionaries","Convert Between Lists and Dictionaries","Learn how to transform data between lists and dictionaries in Python","convert-lists-dictionaries",22,"content:python-how-to:22.convert-lists-dictionaries.md","python-how-to/22.convert-lists-dictionaries.md","python-how-to/22.convert-lists-dictionaries",{"_path":213,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":214,"description":215,"slug":216,"order":217,"isParent":13,"icon":14,"_type":15,"_id":218,"_source":17,"_file":219,"_stem":220,"_extension":20,"children":221,"expanded":13},"/python-how-to/file-operations","File Operations","Learn essential file operations in Python for reading, writing, and managing files","file-operations",23,"content:python-how-to:23.file-operations.md","python-how-to/23.file-operations.md","python-how-to/23.file-operations",[222,231,240,249,258,267,276],{"_path":223,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":224,"description":225,"slug":226,"parentId":213,"order":227,"_type":15,"_id":228,"_source":17,"_file":229,"_stem":230,"_extension":20},"/python-how-to/read-text-files","Read Text Files","Learn how to read text files in Python using different methods","read-text-files",24,"content:python-how-to:24.read-text-files.md","python-how-to/24.read-text-files.md","python-how-to/24.read-text-files",{"_path":232,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":233,"description":234,"slug":235,"parentId":213,"order":236,"_type":15,"_id":237,"_source":17,"_file":238,"_stem":239,"_extension":20},"/python-how-to/write-to-files","Write to Files","Learn how to write and create files in Python using different methods","write-to-files",25,"content:python-how-to:25.write-to-files.md","python-how-to/25.write-to-files.md","python-how-to/25.write-to-files",{"_path":241,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":242,"description":243,"slug":244,"parentId":213,"order":245,"_type":15,"_id":246,"_source":17,"_file":247,"_stem":248,"_extension":20},"/python-how-to/work-csv-files","Work with CSV Files","Learn how to read and write CSV files in Python using the csv module","work-csv-files",26,"content:python-how-to:26.work-csv-files.md","python-how-to/26.work-csv-files.md","python-how-to/26.work-csv-files",{"_path":250,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":251,"description":252,"slug":253,"parentId":213,"order":254,"_type":15,"_id":255,"_source":17,"_file":256,"_stem":257,"_extension":20},"/python-how-to/handle-file-paths","Handle File Paths","Learn how to work with file and directory paths in Python using pathlib and os modules","handle-file-paths",27,"content:python-how-to:27.handle-file-paths.md","python-how-to/27.handle-file-paths.md","python-how-to/27.handle-file-paths",{"_path":259,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":260,"description":261,"slug":262,"parentId":213,"order":263,"_type":15,"_id":264,"_source":17,"_file":265,"_stem":266,"_extension":20},"/python-how-to/work-json-files","Work with JSON Files","Learn how to read and write JSON files in Python using the json module","work-json-files",28,"content:python-how-to:28.work-json-files.md","python-how-to/28.work-json-files.md","python-how-to/28.work-json-files",{"_path":268,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":269,"description":270,"slug":271,"parentId":213,"order":272,"_type":15,"_id":273,"_source":17,"_file":274,"_stem":275,"_extension":20},"/python-how-to/handle-binary-files","Handle Binary Files","Learn how to work with binary files in Python for images, data, and other non-text content","handle-binary-files",29,"content:python-how-to:29.handle-binary-files.md","python-how-to/29.handle-binary-files.md","python-how-to/29.handle-binary-files",{"_path":277,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":278,"description":279,"slug":280,"parentId":213,"order":281,"_type":15,"_id":282,"_source":17,"_file":283,"_stem":284,"_extension":20},"/python-how-to/use-context-managers","Use Context Managers","Learn how to use context managers for safe resource handling in Python","use-context-managers",30,"content:python-how-to:30.use-context-managers.md","python-how-to/30.use-context-managers.md","python-how-to/30.use-context-managers",{"_path":286,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":287,"description":288,"slug":289,"parentId":290,"order":291,"isParent":13,"icon":292,"_type":15,"_id":293,"_source":17,"_file":294,"_stem":295,"_extension":20,"children":296,"expanded":13},"/python-how-to/date-and-time","Date and Time","Master Python's date and time handling with datetime, time zones, formatting, and calculations","date-and-time","/python-how-to",31,"pi pi-calendar","content:python-how-to:31.date-and-time.md","python-how-to/31.date-and-time.md","python-how-to/31.date-and-time",[297,306,315,324,333,342],{"_path":298,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":299,"description":300,"slug":301,"parentId":286,"order":302,"_type":15,"_id":303,"_source":17,"_file":304,"_stem":305,"_extension":20},"/python-how-to/get-current-datetime","Get Current Date/Time","Learn how to get current date, time, and timestamps using Python's datetime module","get-current-datetime",32,"content:python-how-to:32.get-current-datetime.md","python-how-to/32.get-current-datetime.md","python-how-to/32.get-current-datetime",{"_path":307,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":308,"description":309,"slug":310,"parentId":286,"order":311,"_type":15,"_id":312,"_source":17,"_file":313,"_stem":314,"_extension":20},"/python-how-to/format-dates","Format Dates","Master date formatting with strftime, custom formats, and locale-aware formatting for user-friendly displays","format-dates",33,"content:python-how-to:33.format-dates.md","python-how-to/33.format-dates.md","python-how-to/33.format-dates",{"_path":316,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":317,"description":318,"slug":319,"parentId":286,"order":320,"_type":15,"_id":321,"_source":17,"_file":322,"_stem":323,"_extension":20},"/python-how-to/calculate-date-differences","Calculate Date Differences","Learn to calculate time differences, durations, and intervals using Python's timedelta for scheduling and analytics","calculate-date-differences",34,"content:python-how-to:34.calculate-date-differences.md","python-how-to/34.calculate-date-differences.md","python-how-to/34.calculate-date-differences",{"_path":325,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":326,"description":327,"slug":328,"parentId":286,"order":329,"_type":15,"_id":330,"_source":17,"_file":331,"_stem":332,"_extension":20},"/python-how-to/parse-date-strings","Parse Date Strings","Convert text dates into Python datetime objects using strptime, handle multiple formats, and validate date input","parse-date-strings",35,"content:python-how-to:35.parse-date-strings.md","python-how-to/35.parse-date-strings.md","python-how-to/35.parse-date-strings",{"_path":334,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":335,"description":336,"slug":337,"parentId":286,"order":338,"_type":15,"_id":339,"_source":17,"_file":340,"_stem":341,"_extension":20},"/python-how-to/handle-timezones","Handle Timezones","Master timezone handling with zoneinfo, UTC conversions, and timezone-aware datetime objects for global applications","handle-timezones",36,"content:python-how-to:36.handle-timezones.md","python-how-to/36.handle-timezones.md","python-how-to/36.handle-timezones",{"_path":343,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":344,"description":345,"slug":346,"parentId":286,"order":347,"_type":15,"_id":348,"_source":17,"_file":349,"_stem":350,"_extension":20},"/python-how-to/work-with-timestamps","Work with Timestamps","Master Unix timestamps in Python - convert between datetime objects and timestamps for APIs, databases, and system integration","work-with-timestamps",37,"content:python-how-to:37.work-with-timestamps.md","python-how-to/37.work-with-timestamps.md","python-how-to/37.work-with-timestamps",{"_path":352,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":353,"description":354,"slug":355,"parentId":290,"order":356,"isParent":13,"icon":357,"_type":15,"_id":358,"_source":17,"_file":359,"_stem":360,"_extension":20,"children":361,"expanded":13},"/python-how-to/error-handling","Error Handling","Learn Python's error handling with try/except, custom exceptions, debugging, logging, and retry logic for robust applications","error-handling",38,"pi pi-exclamation-triangle","content:python-how-to:38.error-handling.md","python-how-to/38.error-handling.md","python-how-to/38.error-handling",[362,371,380,389,398],{"_path":363,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":364,"description":365,"slug":366,"parentId":352,"order":367,"_type":15,"_id":368,"_source":17,"_file":369,"_stem":370,"_extension":20},"/python-how-to/handle-exceptions","Handle Exceptions","Master try/except blocks, multiple exception handling, and finally clauses for robust error handling in Python","handle-exceptions",39,"content:python-how-to:39.handle-exceptions.md","python-how-to/39.handle-exceptions.md","python-how-to/39.handle-exceptions",{"_path":372,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":373,"description":374,"slug":375,"parentId":352,"order":376,"_type":15,"_id":377,"_source":17,"_file":378,"_stem":379,"_extension":20},"/python-how-to/create-custom-exceptions","Create Custom Exceptions","Learn to create custom exception classes in Python for specific error handling and better code organization","create-custom-exceptions",40,"content:python-how-to:40.create-custom-exceptions.md","python-how-to/40.create-custom-exceptions.md","python-how-to/40.create-custom-exceptions",{"_path":381,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":382,"description":383,"slug":384,"parentId":352,"order":385,"_type":15,"_id":386,"_source":17,"_file":387,"_stem":388,"_extension":20},"/python-how-to/debug-code","Debug Code","Learn Python debugging techniques using print statements, the debugger, and tools to find and fix code issues","debug-code",41,"content:python-how-to:41.debug-code.md","python-how-to/41.debug-code.md","python-how-to/41.debug-code",{"_path":390,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":391,"description":392,"slug":393,"parentId":352,"order":394,"_type":15,"_id":395,"_source":17,"_file":396,"_stem":397,"_extension":20},"/python-how-to/use-logging","Use Logging","Learn Python's logging module for tracking application behavior, errors, and debugging information","use-logging",42,"content:python-how-to:42.use-logging.md","python-how-to/42.use-logging.md","python-how-to/42.use-logging",{"_path":399,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":400,"description":401,"slug":402,"parentId":352,"order":403,"_type":15,"_id":404,"_source":17,"_file":405,"_stem":406,"_extension":20},"/python-how-to/implement-retry-logic","Implement Retry Logic","Learn to implement retry mechanisms in Python for handling temporary failures and building resilient applications","implement-retry-logic",43,"content:python-how-to:43.implement-retry-logic.md","python-how-to/43.implement-retry-logic.md","python-how-to/43.implement-retry-logic",{"_path":408,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":409,"description":410,"slug":411,"parentId":290,"order":412,"isParent":13,"icon":413,"_type":15,"_id":414,"_source":17,"_file":415,"_stem":416,"_extension":20,"children":417},"/python-how-to/functions-and-modules","Functions and Modules","Learn Python functions, modules, and code organization for building reusable, maintainable applications","functions-and-modules",44,"pi pi-box","content:python-how-to:44.functions-and-modules.md","python-how-to/44.functions-and-modules.md","python-how-to/44.functions-and-modules",[418,427,436,445,454,463],{"_path":419,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":420,"description":421,"slug":422,"parentId":408,"order":423,"_type":15,"_id":424,"_source":17,"_file":425,"_stem":426,"_extension":20},"/python-how-to/write-functions","Write Functions","Learn to create Python functions with parameters, return values, and documentation for reusable code","write-functions",45,"content:python-how-to:45.write-functions.md","python-how-to/45.write-functions.md","python-how-to/45.write-functions",{"_path":428,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":429,"description":430,"slug":431,"parentId":408,"order":432,"_type":15,"_id":433,"_source":17,"_file":434,"_stem":435,"_extension":20},"/python-how-to/use-args-kwargs","Use *args and **kwargs","Learn to use *args and **kwargs for flexible function arguments in Python","use-args-kwargs",46,"content:python-how-to:46.use-args-kwargs.md","python-how-to/46.use-args-kwargs.md","python-how-to/46.use-args-kwargs",{"_path":437,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":438,"description":439,"slug":440,"parentId":408,"order":441,"_type":15,"_id":442,"_source":17,"_file":443,"_stem":444,"_extension":20},"/python-how-to/create-decorators","Create Decorators","Learn to create and use Python decorators to enhance function behavior and add functionality","create-decorators",47,"content:python-how-to:47.create-decorators.md","python-how-to/47.create-decorators.md","python-how-to/47.create-decorators",{"_path":446,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":447,"description":448,"slug":449,"parentId":408,"order":450,"_type":15,"_id":451,"_source":17,"_file":452,"_stem":453,"_extension":20},"/python-how-to/use-generators","Use Generators","Learn to create memory-efficient generators with yield for processing large datasets and sequences","use-generators",48,"content:python-how-to:48.use-generators.md","python-how-to/48.use-generators.md","python-how-to/48.use-generators",{"_path":455,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":456,"description":457,"slug":458,"parentId":408,"order":459,"_type":15,"_id":460,"_source":17,"_file":461,"_stem":462,"_extension":20},"/python-how-to/work-modules-packages","Work with Modules and Packages","Learn to organize Python code with modules and packages, and use imports effectively","work-modules-packages",49,"content:python-how-to:49.work-modules-packages.md","python-how-to/49.work-modules-packages.md","python-how-to/49.work-modules-packages",{"_path":464,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":465,"description":466,"slug":467,"parentId":408,"order":468,"_type":15,"_id":469,"_source":17,"_file":470,"_stem":471,"_extension":20},"/python-how-to/create-virtual-environments","Create Virtual Environments","Learn to create and manage Python virtual environments for project dependency isolation","create-virtual-environments",50,"content:python-how-to:50.create-virtual-environments.md","python-how-to/50.create-virtual-environments.md","python-how-to/50.create-virtual-environments",{"_path":473,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":474,"description":475,"slug":476,"parentId":290,"order":477,"isParent":13,"icon":478,"_type":15,"_id":479,"_source":17,"_file":480,"_stem":481,"_extension":20,"children":482},"/python-how-to/data-processing","Data Processing","Learn Python data processing techniques including regex, APIs, databases, and large file handling","data-processing",51,"pi pi-database","content:python-how-to:51.data-processing.md","python-how-to/51.data-processing.md","python-how-to/51.data-processing",[483,492,501,510,519],{"_path":484,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":485,"description":486,"slug":487,"parentId":473,"order":488,"_type":15,"_id":489,"_source":17,"_file":490,"_stem":491,"_extension":20},"/python-how-to/work-regular-expressions","Work with Regular Expressions","Learn to use Python's re module for pattern matching, text extraction, and data validation","work-regular-expressions",52,"content:python-how-to:52.work-regular-expressions.md","python-how-to/52.work-regular-expressions.md","python-how-to/52.work-regular-expressions",{"_path":493,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":494,"description":495,"slug":496,"parentId":473,"order":497,"_type":15,"_id":498,"_source":17,"_file":499,"_stem":500,"_extension":20},"/python-how-to/parse-xml-html","Parse XML and HTML","Learn to extract data from XML and HTML documents using Python's built-in parsing tools","parse-xml-html",53,"content:python-how-to:53.parse-xml-html.md","python-how-to/53.parse-xml-html.md","python-how-to/53.parse-xml-html",{"_path":502,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":503,"description":504,"slug":505,"parentId":473,"order":506,"_type":15,"_id":507,"_source":17,"_file":508,"_stem":509,"_extension":20},"/python-how-to/handle-api-requests","Handle API Requests","Learn to fetch and process data from web APIs using Python's urllib and external requests library","handle-api-requests",54,"content:python-how-to:54.handle-api-requests.md","python-how-to/54.handle-api-requests.md","python-how-to/54.handle-api-requests",{"_path":511,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":512,"description":513,"slug":514,"parentId":473,"order":515,"_type":15,"_id":516,"_source":17,"_file":517,"_stem":518,"_extension":20},"/python-how-to/work-databases","Work with Databases","Learn to connect to and query SQL databases using Python's sqlite3 and database techniques","work-databases",55,"content:python-how-to:55.work-databases.md","python-how-to/55.work-databases.md","python-how-to/55.work-databases",{"_path":520,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":521,"description":522,"slug":523,"parentId":473,"order":524,"_type":15,"_id":525,"_source":17,"_file":526,"_stem":527,"_extension":20},"/python-how-to/process-large-files","Process Large Files","Learn memory-efficient techniques for handling large files and datasets in Python","process-large-files",56,"content:python-how-to:56.process-large-files.md","python-how-to/56.process-large-files.md","python-how-to/56.process-large-files",{"_path":529,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":530,"description":531,"slug":532,"parentId":290,"order":533,"isParent":13,"icon":534,"_type":15,"_id":535,"_source":17,"_file":536,"_stem":537,"_extension":20,"children":538},"/python-how-to/best-practices","Best Practices","Learn Python best practices for writing clean, maintainable, and efficient code","best-practices",57,"pi pi-star","content:python-how-to:57.best-practices.md","python-how-to/57.best-practices.md","python-how-to/57.best-practices",[539,548,557,566,575,584],{"_path":540,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":541,"description":542,"slug":543,"parentId":529,"order":544,"_type":15,"_id":545,"_source":17,"_file":546,"_stem":547,"_extension":20},"/python-how-to/structure-code","Structure Your Code","Learn to organize Python code with proper module structure, functions, and classes","structure-code",58,"content:python-how-to:58.structure-code.md","python-how-to/58.structure-code.md","python-how-to/58.structure-code",{"_path":549,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":550,"description":551,"slug":552,"parentId":529,"order":553,"_type":15,"_id":554,"_source":17,"_file":555,"_stem":556,"_extension":20},"/python-how-to/write-clean-code","Write Clean Code","Learn to write readable, maintainable Python code with proper naming, comments, and clear logic","write-clean-code",59,"content:python-how-to:59.write-clean-code.md","python-how-to/59.write-clean-code.md","python-how-to/59.write-clean-code",{"_path":558,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":559,"description":560,"slug":561,"parentId":529,"order":562,"_type":15,"_id":563,"_source":17,"_file":564,"_stem":565,"_extension":20},"/python-how-to/optimize-performance","Optimize Performance","Learn to identify and fix performance bottlenecks in Python code for faster execution","optimize-performance",60,"content:python-how-to:60.optimize-performance.md","python-how-to/60.optimize-performance.md","python-how-to/60.optimize-performance",{"_path":567,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":568,"description":569,"slug":570,"parentId":529,"order":571,"_type":15,"_id":572,"_source":17,"_file":573,"_stem":574,"_extension":20},"/python-how-to/write-unit-tests","Write Unit Tests","Learn to create reliable unit tests to verify your Python code works correctly and catch bugs early","write-unit-tests",61,"content:python-how-to:61.write-unit-tests.md","python-how-to/61.write-unit-tests.md","python-how-to/61.write-unit-tests",{"_path":576,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":577,"description":578,"slug":579,"parentId":529,"order":580,"_type":15,"_id":581,"_source":17,"_file":582,"_stem":583,"_extension":20},"/python-how-to/document-code","Document Your Code","Learn to write clear documentation and helpful comments for your Python code","document-code",62,"content:python-how-to:62.document-code.md","python-how-to/62.document-code.md","python-how-to/62.document-code",{"_path":585,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":586,"description":587,"slug":588,"parentId":529,"order":589,"_type":15,"_id":590,"_source":17,"_file":591,"_stem":592,"_extension":20},"/python-how-to/use-type-hints","Use Type Hints","Learn to add type annotations to Python code for better clarity, tooling support, and error detection","use-type-hints",63,"content:python-how-to:63.use-type-hints.md","python-how-to/63.use-type-hints.md","python-how-to/63.use-type-hints",{"_path":290,"_dir":8,"_draft":7,"_partial":7,"_locale":8,"title":594,"description":595,"slug":6,"order":596,"icon":14,"_type":15,"_id":597,"_source":17,"_file":598,"_stem":599,"_extension":20,"expanded":13},"Python How-To Guide","Practical Python tutorials for common programming tasks. Learn step-by-step solutions for string manipulation, file operations, data processing, and more with real-world examples.",0,"content:python-how-to:index.md","python-how-to/index.md","python-how-to/index",[389],{"_path":390,"_dir":6,"_draft":7,"_partial":7,"_locale":8,"title":391,"description":392,"slug":393,"parentId":352,"order":394,"body":602,"_type":15,"_id":395,"_source":17,"_file":396,"_stem":397,"_extension":20},{"type":603,"children":604,"toc":5458},"root",[605,614,620,806,813,818,903,910,1293,1299,1694,1700,2107,2113,2250,2256,2262,2613,2619,3082,3088,3587,3593,3599,3738,3744,3921,3927,3933,4388,4394,5276,5282,5428,5434,5439,5452],{"type":606,"tag":607,"props":608,"children":610},"element","h1",{"id":609},"using-logging",[611],{"type":612,"value":613},"text","📝 Using Logging",{"type":606,"tag":615,"props":616,"children":617},"p",{},[618],{"type":612,"value":619},"Logging is a better alternative to print statements for tracking application behavior. Python's logging module provides structured, configurable output that's essential for debugging and monitoring applications.",{"type":606,"tag":621,"props":622,"children":623},"code-try",{},[624],{"type":606,"tag":625,"props":626,"children":630},"pre",{"className":627,"code":628,"language":629,"meta":8,"style":8},"language-python shiki shiki-themes github-light github-dark","import logging\n\n# Basic logging setup\nlogging.basicConfig(level=logging.INFO)\n\n# Create log messages\nlogging.debug(\"This is a debug message\")\nlogging.info(\"Application started\")\nlogging.warning(\"This is a warning\")\nlogging.error(\"An error occurred\")\nlogging.critical(\"Critical system failure\")\n","python",[631],{"type":606,"tag":632,"props":633,"children":634},"code",{"__ignoreMap":8},[635,652,660,669,704,711,719,737,754,772,789],{"type":606,"tag":636,"props":637,"children":639},"span",{"class":638,"line":12},"line",[640,646],{"type":606,"tag":636,"props":641,"children":643},{"style":642},"--shiki-default:#D73A49;--shiki-app-dark-mode:#F97583",[644],{"type":612,"value":645},"import",{"type":606,"tag":636,"props":647,"children":649},{"style":648},"--shiki-default:#24292E;--shiki-app-dark-mode:#E1E4E8",[650],{"type":612,"value":651}," logging\n",{"type":606,"tag":636,"props":653,"children":654},{"class":638,"line":27},[655],{"type":606,"tag":636,"props":656,"children":657},{"emptyLinePlaceholder":13},[658],{"type":612,"value":659},"\n",{"type":606,"tag":636,"props":661,"children":662},{"class":638,"line":36},[663],{"type":606,"tag":636,"props":664,"children":666},{"style":665},"--shiki-default:#6A737D;--shiki-app-dark-mode:#6A737D",[667],{"type":612,"value":668},"# Basic logging setup\n",{"type":606,"tag":636,"props":670,"children":671},{"class":638,"line":45},[672,677,683,688,693,699],{"type":606,"tag":636,"props":673,"children":674},{"style":648},[675],{"type":612,"value":676},"logging.basicConfig(",{"type":606,"tag":636,"props":678,"children":680},{"style":679},"--shiki-default:#E36209;--shiki-app-dark-mode:#FFAB70",[681],{"type":612,"value":682},"level",{"type":606,"tag":636,"props":684,"children":685},{"style":642},[686],{"type":612,"value":687},"=",{"type":606,"tag":636,"props":689,"children":690},{"style":648},[691],{"type":612,"value":692},"logging.",{"type":606,"tag":636,"props":694,"children":696},{"style":695},"--shiki-default:#005CC5;--shiki-app-dark-mode:#79B8FF",[697],{"type":612,"value":698},"INFO",{"type":606,"tag":636,"props":700,"children":701},{"style":648},[702],{"type":612,"value":703},")\n",{"type":606,"tag":636,"props":705,"children":706},{"class":638,"line":54},[707],{"type":606,"tag":636,"props":708,"children":709},{"emptyLinePlaceholder":13},[710],{"type":612,"value":659},{"type":606,"tag":636,"props":712,"children":713},{"class":638,"line":63},[714],{"type":606,"tag":636,"props":715,"children":716},{"style":665},[717],{"type":612,"value":718},"# Create log messages\n",{"type":606,"tag":636,"props":720,"children":721},{"class":638,"line":72},[722,727,733],{"type":606,"tag":636,"props":723,"children":724},{"style":648},[725],{"type":612,"value":726},"logging.debug(",{"type":606,"tag":636,"props":728,"children":730},{"style":729},"--shiki-default:#032F62;--shiki-app-dark-mode:#9ECBFF",[731],{"type":612,"value":732},"\"This is a debug message\"",{"type":606,"tag":636,"props":734,"children":735},{"style":648},[736],{"type":612,"value":703},{"type":606,"tag":636,"props":738,"children":739},{"class":638,"line":81},[740,745,750],{"type":606,"tag":636,"props":741,"children":742},{"style":648},[743],{"type":612,"value":744},"logging.info(",{"type":606,"tag":636,"props":746,"children":747},{"style":729},[748],{"type":612,"value":749},"\"Application started\"",{"type":606,"tag":636,"props":751,"children":752},{"style":648},[753],{"type":612,"value":703},{"type":606,"tag":636,"props":755,"children":757},{"class":638,"line":756},9,[758,763,768],{"type":606,"tag":636,"props":759,"children":760},{"style":648},[761],{"type":612,"value":762},"logging.warning(",{"type":606,"tag":636,"props":764,"children":765},{"style":729},[766],{"type":612,"value":767},"\"This is a warning\"",{"type":606,"tag":636,"props":769,"children":770},{"style":648},[771],{"type":612,"value":703},{"type":606,"tag":636,"props":773,"children":774},{"class":638,"line":99},[775,780,785],{"type":606,"tag":636,"props":776,"children":777},{"style":648},[778],{"type":612,"value":779},"logging.error(",{"type":606,"tag":636,"props":781,"children":782},{"style":729},[783],{"type":612,"value":784},"\"An error occurred\"",{"type":606,"tag":636,"props":786,"children":787},{"style":648},[788],{"type":612,"value":703},{"type":606,"tag":636,"props":790,"children":791},{"class":638,"line":108},[792,797,802],{"type":606,"tag":636,"props":793,"children":794},{"style":648},[795],{"type":612,"value":796},"logging.critical(",{"type":606,"tag":636,"props":798,"children":799},{"style":729},[800],{"type":612,"value":801},"\"Critical system failure\"",{"type":606,"tag":636,"props":803,"children":804},{"style":648},[805],{"type":612,"value":703},{"type":606,"tag":807,"props":808,"children":810},"h2",{"id":809},"basic-logging",[811],{"type":612,"value":812},"🎯 Basic Logging",{"type":606,"tag":615,"props":814,"children":815},{},[816],{"type":612,"value":817},"Logging provides different levels of messages for various situations.",{"type":606,"tag":819,"props":820,"children":824},"info-box",{"emoji":821,"title":822,"type":823},"📊","Log Levels","info",[825,834,893],{"type":606,"tag":615,"props":826,"children":827},{},[828],{"type":606,"tag":829,"props":830,"children":831},"strong",{},[832],{"type":612,"value":833},"Log Levels (lowest to highest):",{"type":606,"tag":835,"props":836,"children":837},"ul",{},[838,850,860,871,882],{"type":606,"tag":839,"props":840,"children":841},"li",{},[842,848],{"type":606,"tag":632,"props":843,"children":845},{"className":844},[],[846],{"type":612,"value":847},"DEBUG",{"type":612,"value":849},": Detailed diagnostic information",{"type":606,"tag":839,"props":851,"children":852},{},[853,858],{"type":606,"tag":632,"props":854,"children":856},{"className":855},[],[857],{"type":612,"value":698},{"type":612,"value":859},": General information about program execution",{"type":606,"tag":839,"props":861,"children":862},{},[863,869],{"type":606,"tag":632,"props":864,"children":866},{"className":865},[],[867],{"type":612,"value":868},"WARNING",{"type":612,"value":870},": Something unexpected happened",{"type":606,"tag":839,"props":872,"children":873},{},[874,880],{"type":606,"tag":632,"props":875,"children":877},{"className":876},[],[878],{"type":612,"value":879},"ERROR",{"type":612,"value":881},": A serious problem occurred",{"type":606,"tag":839,"props":883,"children":884},{},[885,891],{"type":606,"tag":632,"props":886,"children":888},{"className":887},[],[889],{"type":612,"value":890},"CRITICAL",{"type":612,"value":892},": A very serious error occurred",{"type":606,"tag":615,"props":894,"children":895},{},[896,901],{"type":606,"tag":829,"props":897,"children":898},{},[899],{"type":612,"value":900},"Default Level:",{"type":612,"value":902}," WARNING (only WARNING and above are shown)",{"type":606,"tag":904,"props":905,"children":907},"h3",{"id":906},"simple-logging-examples",[908],{"type":612,"value":909},"Simple Logging Examples",{"type":606,"tag":621,"props":911,"children":912},{},[913],{"type":606,"tag":625,"props":914,"children":916},{"className":627,"code":915,"language":629,"meta":8,"style":8},"import logging\n\n# Configure logging to show all levels\nlogging.basicConfig(level=logging.DEBUG)\n\ndef divide_numbers(a, b):\n    logging.info(f\"Dividing {a} by {b}\")\n    \n    if b == 0:\n        logging.error(\"Division by zero attempted\")\n        return None\n    \n    result = a / b\n    logging.info(f\"Division result: {result}\")\n    return result\n\n# Test the function\nresult1 = divide_numbers(10, 2)\nresult2 = divide_numbers(10, 0)\n",[917],{"type":606,"tag":632,"props":918,"children":919},{"__ignoreMap":8},[920,931,938,946,973,980,999,1059,1067,1095,1112,1125,1132,1159,1196,1209,1216,1224,1260],{"type":606,"tag":636,"props":921,"children":922},{"class":638,"line":12},[923,927],{"type":606,"tag":636,"props":924,"children":925},{"style":642},[926],{"type":612,"value":645},{"type":606,"tag":636,"props":928,"children":929},{"style":648},[930],{"type":612,"value":651},{"type":606,"tag":636,"props":932,"children":933},{"class":638,"line":27},[934],{"type":606,"tag":636,"props":935,"children":936},{"emptyLinePlaceholder":13},[937],{"type":612,"value":659},{"type":606,"tag":636,"props":939,"children":940},{"class":638,"line":36},[941],{"type":606,"tag":636,"props":942,"children":943},{"style":665},[944],{"type":612,"value":945},"# Configure logging to show all levels\n",{"type":606,"tag":636,"props":947,"children":948},{"class":638,"line":45},[949,953,957,961,965,969],{"type":606,"tag":636,"props":950,"children":951},{"style":648},[952],{"type":612,"value":676},{"type":606,"tag":636,"props":954,"children":955},{"style":679},[956],{"type":612,"value":682},{"type":606,"tag":636,"props":958,"children":959},{"style":642},[960],{"type":612,"value":687},{"type":606,"tag":636,"props":962,"children":963},{"style":648},[964],{"type":612,"value":692},{"type":606,"tag":636,"props":966,"children":967},{"style":695},[968],{"type":612,"value":847},{"type":606,"tag":636,"props":970,"children":971},{"style":648},[972],{"type":612,"value":703},{"type":606,"tag":636,"props":974,"children":975},{"class":638,"line":54},[976],{"type":606,"tag":636,"props":977,"children":978},{"emptyLinePlaceholder":13},[979],{"type":612,"value":659},{"type":606,"tag":636,"props":981,"children":982},{"class":638,"line":63},[983,988,994],{"type":606,"tag":636,"props":984,"children":985},{"style":642},[986],{"type":612,"value":987},"def",{"type":606,"tag":636,"props":989,"children":991},{"style":990},"--shiki-default:#6F42C1;--shiki-app-dark-mode:#B392F0",[992],{"type":612,"value":993}," divide_numbers",{"type":606,"tag":636,"props":995,"children":996},{"style":648},[997],{"type":612,"value":998},"(a, b):\n",{"type":606,"tag":636,"props":1000,"children":1001},{"class":638,"line":72},[1002,1007,1012,1017,1022,1027,1032,1037,1041,1046,1050,1055],{"type":606,"tag":636,"props":1003,"children":1004},{"style":648},[1005],{"type":612,"value":1006},"    logging.info(",{"type":606,"tag":636,"props":1008,"children":1009},{"style":642},[1010],{"type":612,"value":1011},"f",{"type":606,"tag":636,"props":1013,"children":1014},{"style":729},[1015],{"type":612,"value":1016},"\"Dividing ",{"type":606,"tag":636,"props":1018,"children":1019},{"style":695},[1020],{"type":612,"value":1021},"{",{"type":606,"tag":636,"props":1023,"children":1024},{"style":648},[1025],{"type":612,"value":1026},"a",{"type":606,"tag":636,"props":1028,"children":1029},{"style":695},[1030],{"type":612,"value":1031},"}",{"type":606,"tag":636,"props":1033,"children":1034},{"style":729},[1035],{"type":612,"value":1036}," by ",{"type":606,"tag":636,"props":1038,"children":1039},{"style":695},[1040],{"type":612,"value":1021},{"type":606,"tag":636,"props":1042,"children":1043},{"style":648},[1044],{"type":612,"value":1045},"b",{"type":606,"tag":636,"props":1047,"children":1048},{"style":695},[1049],{"type":612,"value":1031},{"type":606,"tag":636,"props":1051,"children":1052},{"style":729},[1053],{"type":612,"value":1054},"\"",{"type":606,"tag":636,"props":1056,"children":1057},{"style":648},[1058],{"type":612,"value":703},{"type":606,"tag":636,"props":1060,"children":1061},{"class":638,"line":81},[1062],{"type":606,"tag":636,"props":1063,"children":1064},{"style":648},[1065],{"type":612,"value":1066},"    \n",{"type":606,"tag":636,"props":1068,"children":1069},{"class":638,"line":756},[1070,1075,1080,1085,1090],{"type":606,"tag":636,"props":1071,"children":1072},{"style":642},[1073],{"type":612,"value":1074},"    if",{"type":606,"tag":636,"props":1076,"children":1077},{"style":648},[1078],{"type":612,"value":1079}," b ",{"type":606,"tag":636,"props":1081,"children":1082},{"style":642},[1083],{"type":612,"value":1084},"==",{"type":606,"tag":636,"props":1086,"children":1087},{"style":695},[1088],{"type":612,"value":1089}," 0",{"type":606,"tag":636,"props":1091,"children":1092},{"style":648},[1093],{"type":612,"value":1094},":\n",{"type":606,"tag":636,"props":1096,"children":1097},{"class":638,"line":99},[1098,1103,1108],{"type":606,"tag":636,"props":1099,"children":1100},{"style":648},[1101],{"type":612,"value":1102},"        logging.error(",{"type":606,"tag":636,"props":1104,"children":1105},{"style":729},[1106],{"type":612,"value":1107},"\"Division by zero attempted\"",{"type":606,"tag":636,"props":1109,"children":1110},{"style":648},[1111],{"type":612,"value":703},{"type":606,"tag":636,"props":1113,"children":1114},{"class":638,"line":108},[1115,1120],{"type":606,"tag":636,"props":1116,"children":1117},{"style":642},[1118],{"type":612,"value":1119},"        return",{"type":606,"tag":636,"props":1121,"children":1122},{"style":695},[1123],{"type":612,"value":1124}," None\n",{"type":606,"tag":636,"props":1126,"children":1127},{"class":638,"line":117},[1128],{"type":606,"tag":636,"props":1129,"children":1130},{"style":648},[1131],{"type":612,"value":1066},{"type":606,"tag":636,"props":1133,"children":1134},{"class":638,"line":126},[1135,1140,1144,1149,1154],{"type":606,"tag":636,"props":1136,"children":1137},{"style":648},[1138],{"type":612,"value":1139},"    result ",{"type":606,"tag":636,"props":1141,"children":1142},{"style":642},[1143],{"type":612,"value":687},{"type":606,"tag":636,"props":1145,"children":1146},{"style":648},[1147],{"type":612,"value":1148}," a ",{"type":606,"tag":636,"props":1150,"children":1151},{"style":642},[1152],{"type":612,"value":1153},"/",{"type":606,"tag":636,"props":1155,"children":1156},{"style":648},[1157],{"type":612,"value":1158}," b\n",{"type":606,"tag":636,"props":1160,"children":1161},{"class":638,"line":135},[1162,1166,1170,1175,1179,1184,1188,1192],{"type":606,"tag":636,"props":1163,"children":1164},{"style":648},[1165],{"type":612,"value":1006},{"type":606,"tag":636,"props":1167,"children":1168},{"style":642},[1169],{"type":612,"value":1011},{"type":606,"tag":636,"props":1171,"children":1172},{"style":729},[1173],{"type":612,"value":1174},"\"Division result: ",{"type":606,"tag":636,"props":1176,"children":1177},{"style":695},[1178],{"type":612,"value":1021},{"type":606,"tag":636,"props":1180,"children":1181},{"style":648},[1182],{"type":612,"value":1183},"result",{"type":606,"tag":636,"props":1185,"children":1186},{"style":695},[1187],{"type":612,"value":1031},{"type":606,"tag":636,"props":1189,"children":1190},{"style":729},[1191],{"type":612,"value":1054},{"type":606,"tag":636,"props":1193,"children":1194},{"style":648},[1195],{"type":612,"value":703},{"type":606,"tag":636,"props":1197,"children":1198},{"class":638,"line":144},[1199,1204],{"type":606,"tag":636,"props":1200,"children":1201},{"style":642},[1202],{"type":612,"value":1203},"    return",{"type":606,"tag":636,"props":1205,"children":1206},{"style":648},[1207],{"type":612,"value":1208}," result\n",{"type":606,"tag":636,"props":1210,"children":1211},{"class":638,"line":153},[1212],{"type":606,"tag":636,"props":1213,"children":1214},{"emptyLinePlaceholder":13},[1215],{"type":612,"value":659},{"type":606,"tag":636,"props":1217,"children":1218},{"class":638,"line":163},[1219],{"type":606,"tag":636,"props":1220,"children":1221},{"style":665},[1222],{"type":612,"value":1223},"# Test the function\n",{"type":606,"tag":636,"props":1225,"children":1226},{"class":638,"line":172},[1227,1232,1236,1241,1246,1251,1256],{"type":606,"tag":636,"props":1228,"children":1229},{"style":648},[1230],{"type":612,"value":1231},"result1 ",{"type":606,"tag":636,"props":1233,"children":1234},{"style":642},[1235],{"type":612,"value":687},{"type":606,"tag":636,"props":1237,"children":1238},{"style":648},[1239],{"type":612,"value":1240}," divide_numbers(",{"type":606,"tag":636,"props":1242,"children":1243},{"style":695},[1244],{"type":612,"value":1245},"10",{"type":606,"tag":636,"props":1247,"children":1248},{"style":648},[1249],{"type":612,"value":1250},", ",{"type":606,"tag":636,"props":1252,"children":1253},{"style":695},[1254],{"type":612,"value":1255},"2",{"type":606,"tag":636,"props":1257,"children":1258},{"style":648},[1259],{"type":612,"value":703},{"type":606,"tag":636,"props":1261,"children":1262},{"class":638,"line":181},[1263,1268,1272,1276,1280,1284,1289],{"type":606,"tag":636,"props":1264,"children":1265},{"style":648},[1266],{"type":612,"value":1267},"result2 ",{"type":606,"tag":636,"props":1269,"children":1270},{"style":642},[1271],{"type":612,"value":687},{"type":606,"tag":636,"props":1273,"children":1274},{"style":648},[1275],{"type":612,"value":1240},{"type":606,"tag":636,"props":1277,"children":1278},{"style":695},[1279],{"type":612,"value":1245},{"type":606,"tag":636,"props":1281,"children":1282},{"style":648},[1283],{"type":612,"value":1250},{"type":606,"tag":636,"props":1285,"children":1286},{"style":695},[1287],{"type":612,"value":1288},"0",{"type":606,"tag":636,"props":1290,"children":1291},{"style":648},[1292],{"type":612,"value":703},{"type":606,"tag":904,"props":1294,"children":1296},{"id":1295},"logging-with-different-levels",[1297],{"type":612,"value":1298},"Logging with Different Levels",{"type":606,"tag":621,"props":1300,"children":1301},{},[1302],{"type":606,"tag":625,"props":1303,"children":1305},{"className":627,"code":1304,"language":629,"meta":8,"style":8},"import logging\n\n# Set up logging\nlogging.basicConfig(level=logging.DEBUG)\n\ndef process_user_data(user_data):\n    logging.debug(f\"Processing user data: {user_data}\")\n    \n    if not user_data:\n        logging.warning(\"Empty user data received\")\n        return {}\n    \n    if \"email\" not in user_data:\n        logging.error(\"Missing required field: email\")\n        return None\n    \n    logging.info(\"User data processed successfully\")\n    return {\"status\": \"processed\"}\n\n# Test with different scenarios\nprocess_user_data({\"name\": \"Alice\", \"email\": \"alice@example.com\"})\nprocess_user_data({\"name\": \"Bob\"})  # Missing email\nprocess_user_data({})  # Empty data\n",[1306],{"type":606,"tag":632,"props":1307,"children":1308},{"__ignoreMap":8},[1309,1320,1327,1335,1362,1369,1386,1424,1431,1448,1465,1477,1484,1509,1525,1536,1543,1559,1591,1598,1606,1651,1681],{"type":606,"tag":636,"props":1310,"children":1311},{"class":638,"line":12},[1312,1316],{"type":606,"tag":636,"props":1313,"children":1314},{"style":642},[1315],{"type":612,"value":645},{"type":606,"tag":636,"props":1317,"children":1318},{"style":648},[1319],{"type":612,"value":651},{"type":606,"tag":636,"props":1321,"children":1322},{"class":638,"line":27},[1323],{"type":606,"tag":636,"props":1324,"children":1325},{"emptyLinePlaceholder":13},[1326],{"type":612,"value":659},{"type":606,"tag":636,"props":1328,"children":1329},{"class":638,"line":36},[1330],{"type":606,"tag":636,"props":1331,"children":1332},{"style":665},[1333],{"type":612,"value":1334},"# Set up logging\n",{"type":606,"tag":636,"props":1336,"children":1337},{"class":638,"line":45},[1338,1342,1346,1350,1354,1358],{"type":606,"tag":636,"props":1339,"children":1340},{"style":648},[1341],{"type":612,"value":676},{"type":606,"tag":636,"props":1343,"children":1344},{"style":679},[1345],{"type":612,"value":682},{"type":606,"tag":636,"props":1347,"children":1348},{"style":642},[1349],{"type":612,"value":687},{"type":606,"tag":636,"props":1351,"children":1352},{"style":648},[1353],{"type":612,"value":692},{"type":606,"tag":636,"props":1355,"children":1356},{"style":695},[1357],{"type":612,"value":847},{"type":606,"tag":636,"props":1359,"children":1360},{"style":648},[1361],{"type":612,"value":703},{"type":606,"tag":636,"props":1363,"children":1364},{"class":638,"line":54},[1365],{"type":606,"tag":636,"props":1366,"children":1367},{"emptyLinePlaceholder":13},[1368],{"type":612,"value":659},{"type":606,"tag":636,"props":1370,"children":1371},{"class":638,"line":63},[1372,1376,1381],{"type":606,"tag":636,"props":1373,"children":1374},{"style":642},[1375],{"type":612,"value":987},{"type":606,"tag":636,"props":1377,"children":1378},{"style":990},[1379],{"type":612,"value":1380}," process_user_data",{"type":606,"tag":636,"props":1382,"children":1383},{"style":648},[1384],{"type":612,"value":1385},"(user_data):\n",{"type":606,"tag":636,"props":1387,"children":1388},{"class":638,"line":72},[1389,1394,1398,1403,1407,1412,1416,1420],{"type":606,"tag":636,"props":1390,"children":1391},{"style":648},[1392],{"type":612,"value":1393},"    logging.debug(",{"type":606,"tag":636,"props":1395,"children":1396},{"style":642},[1397],{"type":612,"value":1011},{"type":606,"tag":636,"props":1399,"children":1400},{"style":729},[1401],{"type":612,"value":1402},"\"Processing user data: ",{"type":606,"tag":636,"props":1404,"children":1405},{"style":695},[1406],{"type":612,"value":1021},{"type":606,"tag":636,"props":1408,"children":1409},{"style":648},[1410],{"type":612,"value":1411},"user_data",{"type":606,"tag":636,"props":1413,"children":1414},{"style":695},[1415],{"type":612,"value":1031},{"type":606,"tag":636,"props":1417,"children":1418},{"style":729},[1419],{"type":612,"value":1054},{"type":606,"tag":636,"props":1421,"children":1422},{"style":648},[1423],{"type":612,"value":703},{"type":606,"tag":636,"props":1425,"children":1426},{"class":638,"line":81},[1427],{"type":606,"tag":636,"props":1428,"children":1429},{"style":648},[1430],{"type":612,"value":1066},{"type":606,"tag":636,"props":1432,"children":1433},{"class":638,"line":756},[1434,1438,1443],{"type":606,"tag":636,"props":1435,"children":1436},{"style":642},[1437],{"type":612,"value":1074},{"type":606,"tag":636,"props":1439,"children":1440},{"style":642},[1441],{"type":612,"value":1442}," not",{"type":606,"tag":636,"props":1444,"children":1445},{"style":648},[1446],{"type":612,"value":1447}," user_data:\n",{"type":606,"tag":636,"props":1449,"children":1450},{"class":638,"line":99},[1451,1456,1461],{"type":606,"tag":636,"props":1452,"children":1453},{"style":648},[1454],{"type":612,"value":1455},"        logging.warning(",{"type":606,"tag":636,"props":1457,"children":1458},{"style":729},[1459],{"type":612,"value":1460},"\"Empty user data received\"",{"type":606,"tag":636,"props":1462,"children":1463},{"style":648},[1464],{"type":612,"value":703},{"type":606,"tag":636,"props":1466,"children":1467},{"class":638,"line":108},[1468,1472],{"type":606,"tag":636,"props":1469,"children":1470},{"style":642},[1471],{"type":612,"value":1119},{"type":606,"tag":636,"props":1473,"children":1474},{"style":648},[1475],{"type":612,"value":1476}," {}\n",{"type":606,"tag":636,"props":1478,"children":1479},{"class":638,"line":117},[1480],{"type":606,"tag":636,"props":1481,"children":1482},{"style":648},[1483],{"type":612,"value":1066},{"type":606,"tag":636,"props":1485,"children":1486},{"class":638,"line":126},[1487,1491,1496,1500,1505],{"type":606,"tag":636,"props":1488,"children":1489},{"style":642},[1490],{"type":612,"value":1074},{"type":606,"tag":636,"props":1492,"children":1493},{"style":729},[1494],{"type":612,"value":1495}," \"email\"",{"type":606,"tag":636,"props":1497,"children":1498},{"style":642},[1499],{"type":612,"value":1442},{"type":606,"tag":636,"props":1501,"children":1502},{"style":642},[1503],{"type":612,"value":1504}," in",{"type":606,"tag":636,"props":1506,"children":1507},{"style":648},[1508],{"type":612,"value":1447},{"type":606,"tag":636,"props":1510,"children":1511},{"class":638,"line":135},[1512,1516,1521],{"type":606,"tag":636,"props":1513,"children":1514},{"style":648},[1515],{"type":612,"value":1102},{"type":606,"tag":636,"props":1517,"children":1518},{"style":729},[1519],{"type":612,"value":1520},"\"Missing required field: email\"",{"type":606,"tag":636,"props":1522,"children":1523},{"style":648},[1524],{"type":612,"value":703},{"type":606,"tag":636,"props":1526,"children":1527},{"class":638,"line":144},[1528,1532],{"type":606,"tag":636,"props":1529,"children":1530},{"style":642},[1531],{"type":612,"value":1119},{"type":606,"tag":636,"props":1533,"children":1534},{"style":695},[1535],{"type":612,"value":1124},{"type":606,"tag":636,"props":1537,"children":1538},{"class":638,"line":153},[1539],{"type":606,"tag":636,"props":1540,"children":1541},{"style":648},[1542],{"type":612,"value":1066},{"type":606,"tag":636,"props":1544,"children":1545},{"class":638,"line":163},[1546,1550,1555],{"type":606,"tag":636,"props":1547,"children":1548},{"style":648},[1549],{"type":612,"value":1006},{"type":606,"tag":636,"props":1551,"children":1552},{"style":729},[1553],{"type":612,"value":1554},"\"User data processed successfully\"",{"type":606,"tag":636,"props":1556,"children":1557},{"style":648},[1558],{"type":612,"value":703},{"type":606,"tag":636,"props":1560,"children":1561},{"class":638,"line":172},[1562,1566,1571,1576,1581,1586],{"type":606,"tag":636,"props":1563,"children":1564},{"style":642},[1565],{"type":612,"value":1203},{"type":606,"tag":636,"props":1567,"children":1568},{"style":648},[1569],{"type":612,"value":1570}," {",{"type":606,"tag":636,"props":1572,"children":1573},{"style":729},[1574],{"type":612,"value":1575},"\"status\"",{"type":606,"tag":636,"props":1577,"children":1578},{"style":648},[1579],{"type":612,"value":1580},": ",{"type":606,"tag":636,"props":1582,"children":1583},{"style":729},[1584],{"type":612,"value":1585},"\"processed\"",{"type":606,"tag":636,"props":1587,"children":1588},{"style":648},[1589],{"type":612,"value":1590},"}\n",{"type":606,"tag":636,"props":1592,"children":1593},{"class":638,"line":181},[1594],{"type":606,"tag":636,"props":1595,"children":1596},{"emptyLinePlaceholder":13},[1597],{"type":612,"value":659},{"type":606,"tag":636,"props":1599,"children":1600},{"class":638,"line":190},[1601],{"type":606,"tag":636,"props":1602,"children":1603},{"style":665},[1604],{"type":612,"value":1605},"# Test with different scenarios\n",{"type":606,"tag":636,"props":1607,"children":1608},{"class":638,"line":199},[1609,1614,1619,1623,1628,1632,1637,1641,1646],{"type":606,"tag":636,"props":1610,"children":1611},{"style":648},[1612],{"type":612,"value":1613},"process_user_data({",{"type":606,"tag":636,"props":1615,"children":1616},{"style":729},[1617],{"type":612,"value":1618},"\"name\"",{"type":606,"tag":636,"props":1620,"children":1621},{"style":648},[1622],{"type":612,"value":1580},{"type":606,"tag":636,"props":1624,"children":1625},{"style":729},[1626],{"type":612,"value":1627},"\"Alice\"",{"type":606,"tag":636,"props":1629,"children":1630},{"style":648},[1631],{"type":612,"value":1250},{"type":606,"tag":636,"props":1633,"children":1634},{"style":729},[1635],{"type":612,"value":1636},"\"email\"",{"type":606,"tag":636,"props":1638,"children":1639},{"style":648},[1640],{"type":612,"value":1580},{"type":606,"tag":636,"props":1642,"children":1643},{"style":729},[1644],{"type":612,"value":1645},"\"alice@example.com\"",{"type":606,"tag":636,"props":1647,"children":1648},{"style":648},[1649],{"type":612,"value":1650},"})\n",{"type":606,"tag":636,"props":1652,"children":1653},{"class":638,"line":208},[1654,1658,1662,1666,1671,1676],{"type":606,"tag":636,"props":1655,"children":1656},{"style":648},[1657],{"type":612,"value":1613},{"type":606,"tag":636,"props":1659,"children":1660},{"style":729},[1661],{"type":612,"value":1618},{"type":606,"tag":636,"props":1663,"children":1664},{"style":648},[1665],{"type":612,"value":1580},{"type":606,"tag":636,"props":1667,"children":1668},{"style":729},[1669],{"type":612,"value":1670},"\"Bob\"",{"type":606,"tag":636,"props":1672,"children":1673},{"style":648},[1674],{"type":612,"value":1675},"})  ",{"type":606,"tag":636,"props":1677,"children":1678},{"style":665},[1679],{"type":612,"value":1680},"# Missing email\n",{"type":606,"tag":636,"props":1682,"children":1683},{"class":638,"line":217},[1684,1689],{"type":606,"tag":636,"props":1685,"children":1686},{"style":648},[1687],{"type":612,"value":1688},"process_user_data({})  ",{"type":606,"tag":636,"props":1690,"children":1691},{"style":665},[1692],{"type":612,"value":1693},"# Empty data\n",{"type":606,"tag":904,"props":1695,"children":1697},{"id":1696},"logging-exceptions",[1698],{"type":612,"value":1699},"Logging Exceptions",{"type":606,"tag":621,"props":1701,"children":1702},{},[1703],{"type":606,"tag":625,"props":1704,"children":1706},{"className":627,"code":1705,"language":629,"meta":8,"style":8},"import logging\n\nlogging.basicConfig(level=logging.INFO)\n\ndef safe_file_operation(filename):\n    try:\n        logging.info(f\"Attempting to read file: {filename}\")\n        with open(filename, 'r') as file:\n            content = file.read()\n            logging.info(\"File read successfully\")\n            return content\n    except FileNotFoundError:\n        logging.error(f\"File not found: {filename}\")\n        return None\n    except Exception as e:\n        logging.exception(\"Unexpected error occurred\")  # Includes traceback\n        return None\n\n# Test file operations\ncontent = safe_file_operation(\"existing_file.txt\")\ncontent = safe_file_operation(\"missing_file.txt\")\n",[1707],{"type":606,"tag":632,"props":1708,"children":1709},{"__ignoreMap":8},[1710,1721,1728,1755,1762,1779,1791,1829,1871,1892,1909,1922,1939,1975,1986,2008,2031,2042,2049,2057,2083],{"type":606,"tag":636,"props":1711,"children":1712},{"class":638,"line":12},[1713,1717],{"type":606,"tag":636,"props":1714,"children":1715},{"style":642},[1716],{"type":612,"value":645},{"type":606,"tag":636,"props":1718,"children":1719},{"style":648},[1720],{"type":612,"value":651},{"type":606,"tag":636,"props":1722,"children":1723},{"class":638,"line":27},[1724],{"type":606,"tag":636,"props":1725,"children":1726},{"emptyLinePlaceholder":13},[1727],{"type":612,"value":659},{"type":606,"tag":636,"props":1729,"children":1730},{"class":638,"line":36},[1731,1735,1739,1743,1747,1751],{"type":606,"tag":636,"props":1732,"children":1733},{"style":648},[1734],{"type":612,"value":676},{"type":606,"tag":636,"props":1736,"children":1737},{"style":679},[1738],{"type":612,"value":682},{"type":606,"tag":636,"props":1740,"children":1741},{"style":642},[1742],{"type":612,"value":687},{"type":606,"tag":636,"props":1744,"children":1745},{"style":648},[1746],{"type":612,"value":692},{"type":606,"tag":636,"props":1748,"children":1749},{"style":695},[1750],{"type":612,"value":698},{"type":606,"tag":636,"props":1752,"children":1753},{"style":648},[1754],{"type":612,"value":703},{"type":606,"tag":636,"props":1756,"children":1757},{"class":638,"line":45},[1758],{"type":606,"tag":636,"props":1759,"children":1760},{"emptyLinePlaceholder":13},[1761],{"type":612,"value":659},{"type":606,"tag":636,"props":1763,"children":1764},{"class":638,"line":54},[1765,1769,1774],{"type":606,"tag":636,"props":1766,"children":1767},{"style":642},[1768],{"type":612,"value":987},{"type":606,"tag":636,"props":1770,"children":1771},{"style":990},[1772],{"type":612,"value":1773}," safe_file_operation",{"type":606,"tag":636,"props":1775,"children":1776},{"style":648},[1777],{"type":612,"value":1778},"(filename):\n",{"type":606,"tag":636,"props":1780,"children":1781},{"class":638,"line":63},[1782,1787],{"type":606,"tag":636,"props":1783,"children":1784},{"style":642},[1785],{"type":612,"value":1786},"    try",{"type":606,"tag":636,"props":1788,"children":1789},{"style":648},[1790],{"type":612,"value":1094},{"type":606,"tag":636,"props":1792,"children":1793},{"class":638,"line":72},[1794,1799,1803,1808,1812,1817,1821,1825],{"type":606,"tag":636,"props":1795,"children":1796},{"style":648},[1797],{"type":612,"value":1798},"        logging.info(",{"type":606,"tag":636,"props":1800,"children":1801},{"style":642},[1802],{"type":612,"value":1011},{"type":606,"tag":636,"props":1804,"children":1805},{"style":729},[1806],{"type":612,"value":1807},"\"Attempting to read file: ",{"type":606,"tag":636,"props":1809,"children":1810},{"style":695},[1811],{"type":612,"value":1021},{"type":606,"tag":636,"props":1813,"children":1814},{"style":648},[1815],{"type":612,"value":1816},"filename",{"type":606,"tag":636,"props":1818,"children":1819},{"style":695},[1820],{"type":612,"value":1031},{"type":606,"tag":636,"props":1822,"children":1823},{"style":729},[1824],{"type":612,"value":1054},{"type":606,"tag":636,"props":1826,"children":1827},{"style":648},[1828],{"type":612,"value":703},{"type":606,"tag":636,"props":1830,"children":1831},{"class":638,"line":81},[1832,1837,1842,1847,1852,1857,1862,1867],{"type":606,"tag":636,"props":1833,"children":1834},{"style":642},[1835],{"type":612,"value":1836},"        with",{"type":606,"tag":636,"props":1838,"children":1839},{"style":695},[1840],{"type":612,"value":1841}," open",{"type":606,"tag":636,"props":1843,"children":1844},{"style":648},[1845],{"type":612,"value":1846},"(filename, ",{"type":606,"tag":636,"props":1848,"children":1849},{"style":729},[1850],{"type":612,"value":1851},"'r'",{"type":606,"tag":636,"props":1853,"children":1854},{"style":648},[1855],{"type":612,"value":1856},") ",{"type":606,"tag":636,"props":1858,"children":1859},{"style":642},[1860],{"type":612,"value":1861},"as",{"type":606,"tag":636,"props":1863,"children":1864},{"style":679},[1865],{"type":612,"value":1866}," file",{"type":606,"tag":636,"props":1868,"children":1869},{"style":648},[1870],{"type":612,"value":1094},{"type":606,"tag":636,"props":1872,"children":1873},{"class":638,"line":756},[1874,1879,1883,1887],{"type":606,"tag":636,"props":1875,"children":1876},{"style":648},[1877],{"type":612,"value":1878},"            content ",{"type":606,"tag":636,"props":1880,"children":1881},{"style":642},[1882],{"type":612,"value":687},{"type":606,"tag":636,"props":1884,"children":1885},{"style":679},[1886],{"type":612,"value":1866},{"type":606,"tag":636,"props":1888,"children":1889},{"style":648},[1890],{"type":612,"value":1891},".read()\n",{"type":606,"tag":636,"props":1893,"children":1894},{"class":638,"line":99},[1895,1900,1905],{"type":606,"tag":636,"props":1896,"children":1897},{"style":648},[1898],{"type":612,"value":1899},"            logging.info(",{"type":606,"tag":636,"props":1901,"children":1902},{"style":729},[1903],{"type":612,"value":1904},"\"File read successfully\"",{"type":606,"tag":636,"props":1906,"children":1907},{"style":648},[1908],{"type":612,"value":703},{"type":606,"tag":636,"props":1910,"children":1911},{"class":638,"line":108},[1912,1917],{"type":606,"tag":636,"props":1913,"children":1914},{"style":642},[1915],{"type":612,"value":1916},"            return",{"type":606,"tag":636,"props":1918,"children":1919},{"style":648},[1920],{"type":612,"value":1921}," content\n",{"type":606,"tag":636,"props":1923,"children":1924},{"class":638,"line":117},[1925,1930,1935],{"type":606,"tag":636,"props":1926,"children":1927},{"style":642},[1928],{"type":612,"value":1929},"    except",{"type":606,"tag":636,"props":1931,"children":1932},{"style":695},[1933],{"type":612,"value":1934}," FileNotFoundError",{"type":606,"tag":636,"props":1936,"children":1937},{"style":648},[1938],{"type":612,"value":1094},{"type":606,"tag":636,"props":1940,"children":1941},{"class":638,"line":126},[1942,1946,1950,1955,1959,1963,1967,1971],{"type":606,"tag":636,"props":1943,"children":1944},{"style":648},[1945],{"type":612,"value":1102},{"type":606,"tag":636,"props":1947,"children":1948},{"style":642},[1949],{"type":612,"value":1011},{"type":606,"tag":636,"props":1951,"children":1952},{"style":729},[1953],{"type":612,"value":1954},"\"File not found: ",{"type":606,"tag":636,"props":1956,"children":1957},{"style":695},[1958],{"type":612,"value":1021},{"type":606,"tag":636,"props":1960,"children":1961},{"style":648},[1962],{"type":612,"value":1816},{"type":606,"tag":636,"props":1964,"children":1965},{"style":695},[1966],{"type":612,"value":1031},{"type":606,"tag":636,"props":1968,"children":1969},{"style":729},[1970],{"type":612,"value":1054},{"type":606,"tag":636,"props":1972,"children":1973},{"style":648},[1974],{"type":612,"value":703},{"type":606,"tag":636,"props":1976,"children":1977},{"class":638,"line":135},[1978,1982],{"type":606,"tag":636,"props":1979,"children":1980},{"style":642},[1981],{"type":612,"value":1119},{"type":606,"tag":636,"props":1983,"children":1984},{"style":695},[1985],{"type":612,"value":1124},{"type":606,"tag":636,"props":1987,"children":1988},{"class":638,"line":144},[1989,1993,1998,2003],{"type":606,"tag":636,"props":1990,"children":1991},{"style":642},[1992],{"type":612,"value":1929},{"type":606,"tag":636,"props":1994,"children":1995},{"style":695},[1996],{"type":612,"value":1997}," Exception",{"type":606,"tag":636,"props":1999,"children":2000},{"style":642},[2001],{"type":612,"value":2002}," as",{"type":606,"tag":636,"props":2004,"children":2005},{"style":648},[2006],{"type":612,"value":2007}," e:\n",{"type":606,"tag":636,"props":2009,"children":2010},{"class":638,"line":153},[2011,2016,2021,2026],{"type":606,"tag":636,"props":2012,"children":2013},{"style":648},[2014],{"type":612,"value":2015},"        logging.exception(",{"type":606,"tag":636,"props":2017,"children":2018},{"style":729},[2019],{"type":612,"value":2020},"\"Unexpected error occurred\"",{"type":606,"tag":636,"props":2022,"children":2023},{"style":648},[2024],{"type":612,"value":2025},")  ",{"type":606,"tag":636,"props":2027,"children":2028},{"style":665},[2029],{"type":612,"value":2030},"# Includes traceback\n",{"type":606,"tag":636,"props":2032,"children":2033},{"class":638,"line":163},[2034,2038],{"type":606,"tag":636,"props":2035,"children":2036},{"style":642},[2037],{"type":612,"value":1119},{"type":606,"tag":636,"props":2039,"children":2040},{"style":695},[2041],{"type":612,"value":1124},{"type":606,"tag":636,"props":2043,"children":2044},{"class":638,"line":172},[2045],{"type":606,"tag":636,"props":2046,"children":2047},{"emptyLinePlaceholder":13},[2048],{"type":612,"value":659},{"type":606,"tag":636,"props":2050,"children":2051},{"class":638,"line":181},[2052],{"type":606,"tag":636,"props":2053,"children":2054},{"style":665},[2055],{"type":612,"value":2056},"# Test file operations\n",{"type":606,"tag":636,"props":2058,"children":2059},{"class":638,"line":190},[2060,2065,2069,2074,2079],{"type":606,"tag":636,"props":2061,"children":2062},{"style":648},[2063],{"type":612,"value":2064},"content ",{"type":606,"tag":636,"props":2066,"children":2067},{"style":642},[2068],{"type":612,"value":687},{"type":606,"tag":636,"props":2070,"children":2071},{"style":648},[2072],{"type":612,"value":2073}," safe_file_operation(",{"type":606,"tag":636,"props":2075,"children":2076},{"style":729},[2077],{"type":612,"value":2078},"\"existing_file.txt\"",{"type":606,"tag":636,"props":2080,"children":2081},{"style":648},[2082],{"type":612,"value":703},{"type":606,"tag":636,"props":2084,"children":2085},{"class":638,"line":199},[2086,2090,2094,2098,2103],{"type":606,"tag":636,"props":2087,"children":2088},{"style":648},[2089],{"type":612,"value":2064},{"type":606,"tag":636,"props":2091,"children":2092},{"style":642},[2093],{"type":612,"value":687},{"type":606,"tag":636,"props":2095,"children":2096},{"style":648},[2097],{"type":612,"value":2073},{"type":606,"tag":636,"props":2099,"children":2100},{"style":729},[2101],{"type":612,"value":2102},"\"missing_file.txt\"",{"type":606,"tag":636,"props":2104,"children":2105},{"style":648},[2106],{"type":612,"value":703},{"type":606,"tag":807,"props":2108,"children":2110},{"id":2109},"log-level-reference",[2111],{"type":612,"value":2112},"📋 Log Level Reference",{"type":606,"tag":2114,"props":2115,"children":2116},"table",{},[2117,2141],{"type":606,"tag":2118,"props":2119,"children":2120},"thead",{},[2121],{"type":606,"tag":2122,"props":2123,"children":2124},"tr",{},[2125,2131,2136],{"type":606,"tag":2126,"props":2127,"children":2128},"th",{},[2129],{"type":612,"value":2130},"Level",{"type":606,"tag":2126,"props":2132,"children":2133},{},[2134],{"type":612,"value":2135},"Numeric Value",{"type":606,"tag":2126,"props":2137,"children":2138},{},[2139],{"type":612,"value":2140},"When to Use",{"type":606,"tag":2142,"props":2143,"children":2144},"tbody",{},[2145,2166,2187,2208,2229],{"type":606,"tag":2122,"props":2146,"children":2147},{},[2148,2157,2161],{"type":606,"tag":2149,"props":2150,"children":2151},"td",{},[2152],{"type":606,"tag":632,"props":2153,"children":2155},{"className":2154},[],[2156],{"type":612,"value":847},{"type":606,"tag":2149,"props":2158,"children":2159},{},[2160],{"type":612,"value":1245},{"type":606,"tag":2149,"props":2162,"children":2163},{},[2164],{"type":612,"value":2165},"Detailed diagnostic info",{"type":606,"tag":2122,"props":2167,"children":2168},{},[2169,2177,2182],{"type":606,"tag":2149,"props":2170,"children":2171},{},[2172],{"type":606,"tag":632,"props":2173,"children":2175},{"className":2174},[],[2176],{"type":612,"value":698},{"type":606,"tag":2149,"props":2178,"children":2179},{},[2180],{"type":612,"value":2181},"20",{"type":606,"tag":2149,"props":2183,"children":2184},{},[2185],{"type":612,"value":2186},"General information",{"type":606,"tag":2122,"props":2188,"children":2189},{},[2190,2198,2203],{"type":606,"tag":2149,"props":2191,"children":2192},{},[2193],{"type":606,"tag":632,"props":2194,"children":2196},{"className":2195},[],[2197],{"type":612,"value":868},{"type":606,"tag":2149,"props":2199,"children":2200},{},[2201],{"type":612,"value":2202},"30",{"type":606,"tag":2149,"props":2204,"children":2205},{},[2206],{"type":612,"value":2207},"Something unexpected",{"type":606,"tag":2122,"props":2209,"children":2210},{},[2211,2219,2224],{"type":606,"tag":2149,"props":2212,"children":2213},{},[2214],{"type":606,"tag":632,"props":2215,"children":2217},{"className":2216},[],[2218],{"type":612,"value":879},{"type":606,"tag":2149,"props":2220,"children":2221},{},[2222],{"type":612,"value":2223},"40",{"type":606,"tag":2149,"props":2225,"children":2226},{},[2227],{"type":612,"value":2228},"Serious problem",{"type":606,"tag":2122,"props":2230,"children":2231},{},[2232,2240,2245],{"type":606,"tag":2149,"props":2233,"children":2234},{},[2235],{"type":606,"tag":632,"props":2236,"children":2238},{"className":2237},[],[2239],{"type":612,"value":890},{"type":606,"tag":2149,"props":2241,"children":2242},{},[2243],{"type":612,"value":2244},"50",{"type":606,"tag":2149,"props":2246,"children":2247},{},[2248],{"type":612,"value":2249},"Very serious error",{"type":606,"tag":807,"props":2251,"children":2253},{"id":2252},"logging-configuration",[2254],{"type":612,"value":2255},"🔧 Logging Configuration",{"type":606,"tag":904,"props":2257,"children":2259},{"id":2258},"basic-configuration",[2260],{"type":612,"value":2261},"Basic Configuration",{"type":606,"tag":621,"props":2263,"children":2264},{},[2265],{"type":606,"tag":625,"props":2266,"children":2268},{"className":627,"code":2267,"language":629,"meta":8,"style":8},"import logging\n\n# Configure logging format\nlogging.basicConfig(\n    level=logging.INFO,\n    format='%(asctime)s - %(levelname)s - %(message)s'\n)\n\ndef user_login(username):\n    logging.info(f\"User login attempt: {username}\")\n    \n    if username == \"admin\":\n        logging.info(\"Admin user logged in successfully\")\n        return True\n    else:\n        logging.warning(f\"Unknown user login attempt: {username}\")\n        return False\n\n# Test user login\nuser_login(\"admin\")\nuser_login(\"hacker\")\n",[2269],{"type":606,"tag":632,"props":2270,"children":2271},{"__ignoreMap":8},[2272,2283,2290,2298,2306,2331,2377,2384,2391,2408,2445,2452,2477,2493,2505,2517,2553,2565,2572,2580,2597],{"type":606,"tag":636,"props":2273,"children":2274},{"class":638,"line":12},[2275,2279],{"type":606,"tag":636,"props":2276,"children":2277},{"style":642},[2278],{"type":612,"value":645},{"type":606,"tag":636,"props":2280,"children":2281},{"style":648},[2282],{"type":612,"value":651},{"type":606,"tag":636,"props":2284,"children":2285},{"class":638,"line":27},[2286],{"type":606,"tag":636,"props":2287,"children":2288},{"emptyLinePlaceholder":13},[2289],{"type":612,"value":659},{"type":606,"tag":636,"props":2291,"children":2292},{"class":638,"line":36},[2293],{"type":606,"tag":636,"props":2294,"children":2295},{"style":665},[2296],{"type":612,"value":2297},"# Configure logging format\n",{"type":606,"tag":636,"props":2299,"children":2300},{"class":638,"line":45},[2301],{"type":606,"tag":636,"props":2302,"children":2303},{"style":648},[2304],{"type":612,"value":2305},"logging.basicConfig(\n",{"type":606,"tag":636,"props":2307,"children":2308},{"class":638,"line":54},[2309,2314,2318,2322,2326],{"type":606,"tag":636,"props":2310,"children":2311},{"style":679},[2312],{"type":612,"value":2313},"    level",{"type":606,"tag":636,"props":2315,"children":2316},{"style":642},[2317],{"type":612,"value":687},{"type":606,"tag":636,"props":2319,"children":2320},{"style":648},[2321],{"type":612,"value":692},{"type":606,"tag":636,"props":2323,"children":2324},{"style":695},[2325],{"type":612,"value":698},{"type":606,"tag":636,"props":2327,"children":2328},{"style":648},[2329],{"type":612,"value":2330},",\n",{"type":606,"tag":636,"props":2332,"children":2333},{"class":638,"line":63},[2334,2339,2343,2348,2353,2358,2363,2367,2372],{"type":606,"tag":636,"props":2335,"children":2336},{"style":679},[2337],{"type":612,"value":2338},"    format",{"type":606,"tag":636,"props":2340,"children":2341},{"style":642},[2342],{"type":612,"value":687},{"type":606,"tag":636,"props":2344,"children":2345},{"style":729},[2346],{"type":612,"value":2347},"'",{"type":606,"tag":636,"props":2349,"children":2350},{"style":695},[2351],{"type":612,"value":2352},"%(asctime)s",{"type":606,"tag":636,"props":2354,"children":2355},{"style":729},[2356],{"type":612,"value":2357}," - ",{"type":606,"tag":636,"props":2359,"children":2360},{"style":695},[2361],{"type":612,"value":2362},"%(levelname)s",{"type":606,"tag":636,"props":2364,"children":2365},{"style":729},[2366],{"type":612,"value":2357},{"type":606,"tag":636,"props":2368,"children":2369},{"style":695},[2370],{"type":612,"value":2371},"%(message)s",{"type":606,"tag":636,"props":2373,"children":2374},{"style":729},[2375],{"type":612,"value":2376},"'\n",{"type":606,"tag":636,"props":2378,"children":2379},{"class":638,"line":72},[2380],{"type":606,"tag":636,"props":2381,"children":2382},{"style":648},[2383],{"type":612,"value":703},{"type":606,"tag":636,"props":2385,"children":2386},{"class":638,"line":81},[2387],{"type":606,"tag":636,"props":2388,"children":2389},{"emptyLinePlaceholder":13},[2390],{"type":612,"value":659},{"type":606,"tag":636,"props":2392,"children":2393},{"class":638,"line":756},[2394,2398,2403],{"type":606,"tag":636,"props":2395,"children":2396},{"style":642},[2397],{"type":612,"value":987},{"type":606,"tag":636,"props":2399,"children":2400},{"style":990},[2401],{"type":612,"value":2402}," user_login",{"type":606,"tag":636,"props":2404,"children":2405},{"style":648},[2406],{"type":612,"value":2407},"(username):\n",{"type":606,"tag":636,"props":2409,"children":2410},{"class":638,"line":99},[2411,2415,2419,2424,2428,2433,2437,2441],{"type":606,"tag":636,"props":2412,"children":2413},{"style":648},[2414],{"type":612,"value":1006},{"type":606,"tag":636,"props":2416,"children":2417},{"style":642},[2418],{"type":612,"value":1011},{"type":606,"tag":636,"props":2420,"children":2421},{"style":729},[2422],{"type":612,"value":2423},"\"User login attempt: ",{"type":606,"tag":636,"props":2425,"children":2426},{"style":695},[2427],{"type":612,"value":1021},{"type":606,"tag":636,"props":2429,"children":2430},{"style":648},[2431],{"type":612,"value":2432},"username",{"type":606,"tag":636,"props":2434,"children":2435},{"style":695},[2436],{"type":612,"value":1031},{"type":606,"tag":636,"props":2438,"children":2439},{"style":729},[2440],{"type":612,"value":1054},{"type":606,"tag":636,"props":2442,"children":2443},{"style":648},[2444],{"type":612,"value":703},{"type":606,"tag":636,"props":2446,"children":2447},{"class":638,"line":108},[2448],{"type":606,"tag":636,"props":2449,"children":2450},{"style":648},[2451],{"type":612,"value":1066},{"type":606,"tag":636,"props":2453,"children":2454},{"class":638,"line":117},[2455,2459,2464,2468,2473],{"type":606,"tag":636,"props":2456,"children":2457},{"style":642},[2458],{"type":612,"value":1074},{"type":606,"tag":636,"props":2460,"children":2461},{"style":648},[2462],{"type":612,"value":2463}," username ",{"type":606,"tag":636,"props":2465,"children":2466},{"style":642},[2467],{"type":612,"value":1084},{"type":606,"tag":636,"props":2469,"children":2470},{"style":729},[2471],{"type":612,"value":2472}," \"admin\"",{"type":606,"tag":636,"props":2474,"children":2475},{"style":648},[2476],{"type":612,"value":1094},{"type":606,"tag":636,"props":2478,"children":2479},{"class":638,"line":126},[2480,2484,2489],{"type":606,"tag":636,"props":2481,"children":2482},{"style":648},[2483],{"type":612,"value":1798},{"type":606,"tag":636,"props":2485,"children":2486},{"style":729},[2487],{"type":612,"value":2488},"\"Admin user logged in successfully\"",{"type":606,"tag":636,"props":2490,"children":2491},{"style":648},[2492],{"type":612,"value":703},{"type":606,"tag":636,"props":2494,"children":2495},{"class":638,"line":135},[2496,2500],{"type":606,"tag":636,"props":2497,"children":2498},{"style":642},[2499],{"type":612,"value":1119},{"type":606,"tag":636,"props":2501,"children":2502},{"style":695},[2503],{"type":612,"value":2504}," True\n",{"type":606,"tag":636,"props":2506,"children":2507},{"class":638,"line":144},[2508,2513],{"type":606,"tag":636,"props":2509,"children":2510},{"style":642},[2511],{"type":612,"value":2512},"    else",{"type":606,"tag":636,"props":2514,"children":2515},{"style":648},[2516],{"type":612,"value":1094},{"type":606,"tag":636,"props":2518,"children":2519},{"class":638,"line":153},[2520,2524,2528,2533,2537,2541,2545,2549],{"type":606,"tag":636,"props":2521,"children":2522},{"style":648},[2523],{"type":612,"value":1455},{"type":606,"tag":636,"props":2525,"children":2526},{"style":642},[2527],{"type":612,"value":1011},{"type":606,"tag":636,"props":2529,"children":2530},{"style":729},[2531],{"type":612,"value":2532},"\"Unknown user login attempt: ",{"type":606,"tag":636,"props":2534,"children":2535},{"style":695},[2536],{"type":612,"value":1021},{"type":606,"tag":636,"props":2538,"children":2539},{"style":648},[2540],{"type":612,"value":2432},{"type":606,"tag":636,"props":2542,"children":2543},{"style":695},[2544],{"type":612,"value":1031},{"type":606,"tag":636,"props":2546,"children":2547},{"style":729},[2548],{"type":612,"value":1054},{"type":606,"tag":636,"props":2550,"children":2551},{"style":648},[2552],{"type":612,"value":703},{"type":606,"tag":636,"props":2554,"children":2555},{"class":638,"line":163},[2556,2560],{"type":606,"tag":636,"props":2557,"children":2558},{"style":642},[2559],{"type":612,"value":1119},{"type":606,"tag":636,"props":2561,"children":2562},{"style":695},[2563],{"type":612,"value":2564}," False\n",{"type":606,"tag":636,"props":2566,"children":2567},{"class":638,"line":172},[2568],{"type":606,"tag":636,"props":2569,"children":2570},{"emptyLinePlaceholder":13},[2571],{"type":612,"value":659},{"type":606,"tag":636,"props":2573,"children":2574},{"class":638,"line":181},[2575],{"type":606,"tag":636,"props":2576,"children":2577},{"style":665},[2578],{"type":612,"value":2579},"# Test user login\n",{"type":606,"tag":636,"props":2581,"children":2582},{"class":638,"line":190},[2583,2588,2593],{"type":606,"tag":636,"props":2584,"children":2585},{"style":648},[2586],{"type":612,"value":2587},"user_login(",{"type":606,"tag":636,"props":2589,"children":2590},{"style":729},[2591],{"type":612,"value":2592},"\"admin\"",{"type":606,"tag":636,"props":2594,"children":2595},{"style":648},[2596],{"type":612,"value":703},{"type":606,"tag":636,"props":2598,"children":2599},{"class":638,"line":199},[2600,2604,2609],{"type":606,"tag":636,"props":2601,"children":2602},{"style":648},[2603],{"type":612,"value":2587},{"type":606,"tag":636,"props":2605,"children":2606},{"style":729},[2607],{"type":612,"value":2608},"\"hacker\"",{"type":606,"tag":636,"props":2610,"children":2611},{"style":648},[2612],{"type":612,"value":703},{"type":606,"tag":904,"props":2614,"children":2616},{"id":2615},"logging-to-file",[2617],{"type":612,"value":2618},"Logging to File",{"type":606,"tag":621,"props":2620,"children":2621},{},[2622],{"type":606,"tag":625,"props":2623,"children":2625},{"className":627,"code":2624,"language":629,"meta":8,"style":8},"import logging\n\n# Configure logging to file\nlogging.basicConfig(\n    filename='application.log',\n    level=logging.INFO,\n    format='%(asctime)s - %(levelname)s - %(message)s'\n)\n\ndef database_operation(operation, table):\n    logging.info(f\"Database operation: {operation} on table {table}\")\n    \n    try:\n        # Simulate database operation\n        if table == \"users\":\n            logging.info(\"Operation completed successfully\")\n            return True\n        else:\n            logging.error(f\"Table '{table}' not found\")\n            return False\n    except Exception as e:\n        logging.exception(\"Database operation failed\")\n        return False\n\n# Test database operations\ndatabase_operation(\"SELECT\", \"users\")\ndatabase_operation(\"INSERT\", \"invalid_table\")\n",[2626],{"type":606,"tag":632,"props":2627,"children":2628},{"__ignoreMap":8},[2629,2640,2647,2655,2662,2683,2706,2745,2752,2759,2776,2830,2837,2848,2856,2882,2898,2909,2921,2959,2970,2989,3005,3016,3023,3031,3057],{"type":606,"tag":636,"props":2630,"children":2631},{"class":638,"line":12},[2632,2636],{"type":606,"tag":636,"props":2633,"children":2634},{"style":642},[2635],{"type":612,"value":645},{"type":606,"tag":636,"props":2637,"children":2638},{"style":648},[2639],{"type":612,"value":651},{"type":606,"tag":636,"props":2641,"children":2642},{"class":638,"line":27},[2643],{"type":606,"tag":636,"props":2644,"children":2645},{"emptyLinePlaceholder":13},[2646],{"type":612,"value":659},{"type":606,"tag":636,"props":2648,"children":2649},{"class":638,"line":36},[2650],{"type":606,"tag":636,"props":2651,"children":2652},{"style":665},[2653],{"type":612,"value":2654},"# Configure logging to file\n",{"type":606,"tag":636,"props":2656,"children":2657},{"class":638,"line":45},[2658],{"type":606,"tag":636,"props":2659,"children":2660},{"style":648},[2661],{"type":612,"value":2305},{"type":606,"tag":636,"props":2663,"children":2664},{"class":638,"line":54},[2665,2670,2674,2679],{"type":606,"tag":636,"props":2666,"children":2667},{"style":679},[2668],{"type":612,"value":2669},"    filename",{"type":606,"tag":636,"props":2671,"children":2672},{"style":642},[2673],{"type":612,"value":687},{"type":606,"tag":636,"props":2675,"children":2676},{"style":729},[2677],{"type":612,"value":2678},"'application.log'",{"type":606,"tag":636,"props":2680,"children":2681},{"style":648},[2682],{"type":612,"value":2330},{"type":606,"tag":636,"props":2684,"children":2685},{"class":638,"line":63},[2686,2690,2694,2698,2702],{"type":606,"tag":636,"props":2687,"children":2688},{"style":679},[2689],{"type":612,"value":2313},{"type":606,"tag":636,"props":2691,"children":2692},{"style":642},[2693],{"type":612,"value":687},{"type":606,"tag":636,"props":2695,"children":2696},{"style":648},[2697],{"type":612,"value":692},{"type":606,"tag":636,"props":2699,"children":2700},{"style":695},[2701],{"type":612,"value":698},{"type":606,"tag":636,"props":2703,"children":2704},{"style":648},[2705],{"type":612,"value":2330},{"type":606,"tag":636,"props":2707,"children":2708},{"class":638,"line":72},[2709,2713,2717,2721,2725,2729,2733,2737,2741],{"type":606,"tag":636,"props":2710,"children":2711},{"style":679},[2712],{"type":612,"value":2338},{"type":606,"tag":636,"props":2714,"children":2715},{"style":642},[2716],{"type":612,"value":687},{"type":606,"tag":636,"props":2718,"children":2719},{"style":729},[2720],{"type":612,"value":2347},{"type":606,"tag":636,"props":2722,"children":2723},{"style":695},[2724],{"type":612,"value":2352},{"type":606,"tag":636,"props":2726,"children":2727},{"style":729},[2728],{"type":612,"value":2357},{"type":606,"tag":636,"props":2730,"children":2731},{"style":695},[2732],{"type":612,"value":2362},{"type":606,"tag":636,"props":2734,"children":2735},{"style":729},[2736],{"type":612,"value":2357},{"type":606,"tag":636,"props":2738,"children":2739},{"style":695},[2740],{"type":612,"value":2371},{"type":606,"tag":636,"props":2742,"children":2743},{"style":729},[2744],{"type":612,"value":2376},{"type":606,"tag":636,"props":2746,"children":2747},{"class":638,"line":81},[2748],{"type":606,"tag":636,"props":2749,"children":2750},{"style":648},[2751],{"type":612,"value":703},{"type":606,"tag":636,"props":2753,"children":2754},{"class":638,"line":756},[2755],{"type":606,"tag":636,"props":2756,"children":2757},{"emptyLinePlaceholder":13},[2758],{"type":612,"value":659},{"type":606,"tag":636,"props":2760,"children":2761},{"class":638,"line":99},[2762,2766,2771],{"type":606,"tag":636,"props":2763,"children":2764},{"style":642},[2765],{"type":612,"value":987},{"type":606,"tag":636,"props":2767,"children":2768},{"style":990},[2769],{"type":612,"value":2770}," database_operation",{"type":606,"tag":636,"props":2772,"children":2773},{"style":648},[2774],{"type":612,"value":2775},"(operation, table):\n",{"type":606,"tag":636,"props":2777,"children":2778},{"class":638,"line":108},[2779,2783,2787,2792,2796,2801,2805,2810,2814,2818,2822,2826],{"type":606,"tag":636,"props":2780,"children":2781},{"style":648},[2782],{"type":612,"value":1006},{"type":606,"tag":636,"props":2784,"children":2785},{"style":642},[2786],{"type":612,"value":1011},{"type":606,"tag":636,"props":2788,"children":2789},{"style":729},[2790],{"type":612,"value":2791},"\"Database operation: ",{"type":606,"tag":636,"props":2793,"children":2794},{"style":695},[2795],{"type":612,"value":1021},{"type":606,"tag":636,"props":2797,"children":2798},{"style":648},[2799],{"type":612,"value":2800},"operation",{"type":606,"tag":636,"props":2802,"children":2803},{"style":695},[2804],{"type":612,"value":1031},{"type":606,"tag":636,"props":2806,"children":2807},{"style":729},[2808],{"type":612,"value":2809}," on table ",{"type":606,"tag":636,"props":2811,"children":2812},{"style":695},[2813],{"type":612,"value":1021},{"type":606,"tag":636,"props":2815,"children":2816},{"style":648},[2817],{"type":612,"value":2114},{"type":606,"tag":636,"props":2819,"children":2820},{"style":695},[2821],{"type":612,"value":1031},{"type":606,"tag":636,"props":2823,"children":2824},{"style":729},[2825],{"type":612,"value":1054},{"type":606,"tag":636,"props":2827,"children":2828},{"style":648},[2829],{"type":612,"value":703},{"type":606,"tag":636,"props":2831,"children":2832},{"class":638,"line":117},[2833],{"type":606,"tag":636,"props":2834,"children":2835},{"style":648},[2836],{"type":612,"value":1066},{"type":606,"tag":636,"props":2838,"children":2839},{"class":638,"line":126},[2840,2844],{"type":606,"tag":636,"props":2841,"children":2842},{"style":642},[2843],{"type":612,"value":1786},{"type":606,"tag":636,"props":2845,"children":2846},{"style":648},[2847],{"type":612,"value":1094},{"type":606,"tag":636,"props":2849,"children":2850},{"class":638,"line":135},[2851],{"type":606,"tag":636,"props":2852,"children":2853},{"style":665},[2854],{"type":612,"value":2855},"        # Simulate database operation\n",{"type":606,"tag":636,"props":2857,"children":2858},{"class":638,"line":144},[2859,2864,2869,2873,2878],{"type":606,"tag":636,"props":2860,"children":2861},{"style":642},[2862],{"type":612,"value":2863},"        if",{"type":606,"tag":636,"props":2865,"children":2866},{"style":648},[2867],{"type":612,"value":2868}," table ",{"type":606,"tag":636,"props":2870,"children":2871},{"style":642},[2872],{"type":612,"value":1084},{"type":606,"tag":636,"props":2874,"children":2875},{"style":729},[2876],{"type":612,"value":2877}," \"users\"",{"type":606,"tag":636,"props":2879,"children":2880},{"style":648},[2881],{"type":612,"value":1094},{"type":606,"tag":636,"props":2883,"children":2884},{"class":638,"line":153},[2885,2889,2894],{"type":606,"tag":636,"props":2886,"children":2887},{"style":648},[2888],{"type":612,"value":1899},{"type":606,"tag":636,"props":2890,"children":2891},{"style":729},[2892],{"type":612,"value":2893},"\"Operation completed successfully\"",{"type":606,"tag":636,"props":2895,"children":2896},{"style":648},[2897],{"type":612,"value":703},{"type":606,"tag":636,"props":2899,"children":2900},{"class":638,"line":163},[2901,2905],{"type":606,"tag":636,"props":2902,"children":2903},{"style":642},[2904],{"type":612,"value":1916},{"type":606,"tag":636,"props":2906,"children":2907},{"style":695},[2908],{"type":612,"value":2504},{"type":606,"tag":636,"props":2910,"children":2911},{"class":638,"line":172},[2912,2917],{"type":606,"tag":636,"props":2913,"children":2914},{"style":642},[2915],{"type":612,"value":2916},"        else",{"type":606,"tag":636,"props":2918,"children":2919},{"style":648},[2920],{"type":612,"value":1094},{"type":606,"tag":636,"props":2922,"children":2923},{"class":638,"line":181},[2924,2929,2933,2938,2942,2946,2950,2955],{"type":606,"tag":636,"props":2925,"children":2926},{"style":648},[2927],{"type":612,"value":2928},"            logging.error(",{"type":606,"tag":636,"props":2930,"children":2931},{"style":642},[2932],{"type":612,"value":1011},{"type":606,"tag":636,"props":2934,"children":2935},{"style":729},[2936],{"type":612,"value":2937},"\"Table '",{"type":606,"tag":636,"props":2939,"children":2940},{"style":695},[2941],{"type":612,"value":1021},{"type":606,"tag":636,"props":2943,"children":2944},{"style":648},[2945],{"type":612,"value":2114},{"type":606,"tag":636,"props":2947,"children":2948},{"style":695},[2949],{"type":612,"value":1031},{"type":606,"tag":636,"props":2951,"children":2952},{"style":729},[2953],{"type":612,"value":2954},"' not found\"",{"type":606,"tag":636,"props":2956,"children":2957},{"style":648},[2958],{"type":612,"value":703},{"type":606,"tag":636,"props":2960,"children":2961},{"class":638,"line":190},[2962,2966],{"type":606,"tag":636,"props":2963,"children":2964},{"style":642},[2965],{"type":612,"value":1916},{"type":606,"tag":636,"props":2967,"children":2968},{"style":695},[2969],{"type":612,"value":2564},{"type":606,"tag":636,"props":2971,"children":2972},{"class":638,"line":199},[2973,2977,2981,2985],{"type":606,"tag":636,"props":2974,"children":2975},{"style":642},[2976],{"type":612,"value":1929},{"type":606,"tag":636,"props":2978,"children":2979},{"style":695},[2980],{"type":612,"value":1997},{"type":606,"tag":636,"props":2982,"children":2983},{"style":642},[2984],{"type":612,"value":2002},{"type":606,"tag":636,"props":2986,"children":2987},{"style":648},[2988],{"type":612,"value":2007},{"type":606,"tag":636,"props":2990,"children":2991},{"class":638,"line":208},[2992,2996,3001],{"type":606,"tag":636,"props":2993,"children":2994},{"style":648},[2995],{"type":612,"value":2015},{"type":606,"tag":636,"props":2997,"children":2998},{"style":729},[2999],{"type":612,"value":3000},"\"Database operation failed\"",{"type":606,"tag":636,"props":3002,"children":3003},{"style":648},[3004],{"type":612,"value":703},{"type":606,"tag":636,"props":3006,"children":3007},{"class":638,"line":217},[3008,3012],{"type":606,"tag":636,"props":3009,"children":3010},{"style":642},[3011],{"type":612,"value":1119},{"type":606,"tag":636,"props":3013,"children":3014},{"style":695},[3015],{"type":612,"value":2564},{"type":606,"tag":636,"props":3017,"children":3018},{"class":638,"line":227},[3019],{"type":606,"tag":636,"props":3020,"children":3021},{"emptyLinePlaceholder":13},[3022],{"type":612,"value":659},{"type":606,"tag":636,"props":3024,"children":3025},{"class":638,"line":236},[3026],{"type":606,"tag":636,"props":3027,"children":3028},{"style":665},[3029],{"type":612,"value":3030},"# Test database operations\n",{"type":606,"tag":636,"props":3032,"children":3033},{"class":638,"line":245},[3034,3039,3044,3048,3053],{"type":606,"tag":636,"props":3035,"children":3036},{"style":648},[3037],{"type":612,"value":3038},"database_operation(",{"type":606,"tag":636,"props":3040,"children":3041},{"style":729},[3042],{"type":612,"value":3043},"\"SELECT\"",{"type":606,"tag":636,"props":3045,"children":3046},{"style":648},[3047],{"type":612,"value":1250},{"type":606,"tag":636,"props":3049,"children":3050},{"style":729},[3051],{"type":612,"value":3052},"\"users\"",{"type":606,"tag":636,"props":3054,"children":3055},{"style":648},[3056],{"type":612,"value":703},{"type":606,"tag":636,"props":3058,"children":3059},{"class":638,"line":254},[3060,3064,3069,3073,3078],{"type":606,"tag":636,"props":3061,"children":3062},{"style":648},[3063],{"type":612,"value":3038},{"type":606,"tag":636,"props":3065,"children":3066},{"style":729},[3067],{"type":612,"value":3068},"\"INSERT\"",{"type":606,"tag":636,"props":3070,"children":3071},{"style":648},[3072],{"type":612,"value":1250},{"type":606,"tag":636,"props":3074,"children":3075},{"style":729},[3076],{"type":612,"value":3077},"\"invalid_table\"",{"type":606,"tag":636,"props":3079,"children":3080},{"style":648},[3081],{"type":612,"value":703},{"type":606,"tag":904,"props":3083,"children":3085},{"id":3084},"custom-logger",[3086],{"type":612,"value":3087},"Custom Logger",{"type":606,"tag":621,"props":3089,"children":3090},{},[3091],{"type":606,"tag":625,"props":3092,"children":3094},{"className":627,"code":3093,"language":629,"meta":8,"style":8},"import logging\n\n# Create custom logger\nlogger = logging.getLogger('my_application')\nlogger.setLevel(logging.DEBUG)\n\n# Create handler for console output\nconsole_handler = logging.StreamHandler()\nconsole_handler.setLevel(logging.INFO)\n\n# Create formatter\nformatter = logging.Formatter('%(name)s - %(levelname)s - %(message)s')\nconsole_handler.setFormatter(formatter)\n\n# Add handler to logger\nlogger.addHandler(console_handler)\n\ndef api_request(endpoint):\n    logger.debug(f\"API request details: {endpoint}\")\n    logger.info(f\"Making API request to: {endpoint}\")\n    \n    if endpoint.startswith(\"/api/\"):\n        logger.info(\"API request successful\")\n        return {\"status\": \"success\"}\n    else:\n        logger.error(\"Invalid API endpoint\")\n        return {\"status\": \"error\"}\n\n# Test API requests\napi_request(\"/api/users\")\napi_request(\"/invalid/endpoint\")\n",[3095],{"type":606,"tag":632,"props":3096,"children":3097},{"__ignoreMap":8},[3098,3109,3116,3124,3150,3166,3173,3181,3198,3214,3221,3229,3279,3287,3294,3302,3310,3317,3334,3372,3409,3416,3438,3455,3483,3494,3511,3539,3546,3554,3571],{"type":606,"tag":636,"props":3099,"children":3100},{"class":638,"line":12},[3101,3105],{"type":606,"tag":636,"props":3102,"children":3103},{"style":642},[3104],{"type":612,"value":645},{"type":606,"tag":636,"props":3106,"children":3107},{"style":648},[3108],{"type":612,"value":651},{"type":606,"tag":636,"props":3110,"children":3111},{"class":638,"line":27},[3112],{"type":606,"tag":636,"props":3113,"children":3114},{"emptyLinePlaceholder":13},[3115],{"type":612,"value":659},{"type":606,"tag":636,"props":3117,"children":3118},{"class":638,"line":36},[3119],{"type":606,"tag":636,"props":3120,"children":3121},{"style":665},[3122],{"type":612,"value":3123},"# Create custom logger\n",{"type":606,"tag":636,"props":3125,"children":3126},{"class":638,"line":45},[3127,3132,3136,3141,3146],{"type":606,"tag":636,"props":3128,"children":3129},{"style":648},[3130],{"type":612,"value":3131},"logger ",{"type":606,"tag":636,"props":3133,"children":3134},{"style":642},[3135],{"type":612,"value":687},{"type":606,"tag":636,"props":3137,"children":3138},{"style":648},[3139],{"type":612,"value":3140}," logging.getLogger(",{"type":606,"tag":636,"props":3142,"children":3143},{"style":729},[3144],{"type":612,"value":3145},"'my_application'",{"type":606,"tag":636,"props":3147,"children":3148},{"style":648},[3149],{"type":612,"value":703},{"type":606,"tag":636,"props":3151,"children":3152},{"class":638,"line":54},[3153,3158,3162],{"type":606,"tag":636,"props":3154,"children":3155},{"style":648},[3156],{"type":612,"value":3157},"logger.setLevel(logging.",{"type":606,"tag":636,"props":3159,"children":3160},{"style":695},[3161],{"type":612,"value":847},{"type":606,"tag":636,"props":3163,"children":3164},{"style":648},[3165],{"type":612,"value":703},{"type":606,"tag":636,"props":3167,"children":3168},{"class":638,"line":63},[3169],{"type":606,"tag":636,"props":3170,"children":3171},{"emptyLinePlaceholder":13},[3172],{"type":612,"value":659},{"type":606,"tag":636,"props":3174,"children":3175},{"class":638,"line":72},[3176],{"type":606,"tag":636,"props":3177,"children":3178},{"style":665},[3179],{"type":612,"value":3180},"# Create handler for console output\n",{"type":606,"tag":636,"props":3182,"children":3183},{"class":638,"line":81},[3184,3189,3193],{"type":606,"tag":636,"props":3185,"children":3186},{"style":648},[3187],{"type":612,"value":3188},"console_handler ",{"type":606,"tag":636,"props":3190,"children":3191},{"style":642},[3192],{"type":612,"value":687},{"type":606,"tag":636,"props":3194,"children":3195},{"style":648},[3196],{"type":612,"value":3197}," logging.StreamHandler()\n",{"type":606,"tag":636,"props":3199,"children":3200},{"class":638,"line":756},[3201,3206,3210],{"type":606,"tag":636,"props":3202,"children":3203},{"style":648},[3204],{"type":612,"value":3205},"console_handler.setLevel(logging.",{"type":606,"tag":636,"props":3207,"children":3208},{"style":695},[3209],{"type":612,"value":698},{"type":606,"tag":636,"props":3211,"children":3212},{"style":648},[3213],{"type":612,"value":703},{"type":606,"tag":636,"props":3215,"children":3216},{"class":638,"line":99},[3217],{"type":606,"tag":636,"props":3218,"children":3219},{"emptyLinePlaceholder":13},[3220],{"type":612,"value":659},{"type":606,"tag":636,"props":3222,"children":3223},{"class":638,"line":108},[3224],{"type":606,"tag":636,"props":3225,"children":3226},{"style":665},[3227],{"type":612,"value":3228},"# Create formatter\n",{"type":606,"tag":636,"props":3230,"children":3231},{"class":638,"line":117},[3232,3237,3241,3246,3250,3255,3259,3263,3267,3271,3275],{"type":606,"tag":636,"props":3233,"children":3234},{"style":648},[3235],{"type":612,"value":3236},"formatter ",{"type":606,"tag":636,"props":3238,"children":3239},{"style":642},[3240],{"type":612,"value":687},{"type":606,"tag":636,"props":3242,"children":3243},{"style":648},[3244],{"type":612,"value":3245}," logging.Formatter(",{"type":606,"tag":636,"props":3247,"children":3248},{"style":729},[3249],{"type":612,"value":2347},{"type":606,"tag":636,"props":3251,"children":3252},{"style":695},[3253],{"type":612,"value":3254},"%(name)s",{"type":606,"tag":636,"props":3256,"children":3257},{"style":729},[3258],{"type":612,"value":2357},{"type":606,"tag":636,"props":3260,"children":3261},{"style":695},[3262],{"type":612,"value":2362},{"type":606,"tag":636,"props":3264,"children":3265},{"style":729},[3266],{"type":612,"value":2357},{"type":606,"tag":636,"props":3268,"children":3269},{"style":695},[3270],{"type":612,"value":2371},{"type":606,"tag":636,"props":3272,"children":3273},{"style":729},[3274],{"type":612,"value":2347},{"type":606,"tag":636,"props":3276,"children":3277},{"style":648},[3278],{"type":612,"value":703},{"type":606,"tag":636,"props":3280,"children":3281},{"class":638,"line":126},[3282],{"type":606,"tag":636,"props":3283,"children":3284},{"style":648},[3285],{"type":612,"value":3286},"console_handler.setFormatter(formatter)\n",{"type":606,"tag":636,"props":3288,"children":3289},{"class":638,"line":135},[3290],{"type":606,"tag":636,"props":3291,"children":3292},{"emptyLinePlaceholder":13},[3293],{"type":612,"value":659},{"type":606,"tag":636,"props":3295,"children":3296},{"class":638,"line":144},[3297],{"type":606,"tag":636,"props":3298,"children":3299},{"style":665},[3300],{"type":612,"value":3301},"# Add handler to logger\n",{"type":606,"tag":636,"props":3303,"children":3304},{"class":638,"line":153},[3305],{"type":606,"tag":636,"props":3306,"children":3307},{"style":648},[3308],{"type":612,"value":3309},"logger.addHandler(console_handler)\n",{"type":606,"tag":636,"props":3311,"children":3312},{"class":638,"line":163},[3313],{"type":606,"tag":636,"props":3314,"children":3315},{"emptyLinePlaceholder":13},[3316],{"type":612,"value":659},{"type":606,"tag":636,"props":3318,"children":3319},{"class":638,"line":172},[3320,3324,3329],{"type":606,"tag":636,"props":3321,"children":3322},{"style":642},[3323],{"type":612,"value":987},{"type":606,"tag":636,"props":3325,"children":3326},{"style":990},[3327],{"type":612,"value":3328}," api_request",{"type":606,"tag":636,"props":3330,"children":3331},{"style":648},[3332],{"type":612,"value":3333},"(endpoint):\n",{"type":606,"tag":636,"props":3335,"children":3336},{"class":638,"line":181},[3337,3342,3346,3351,3355,3360,3364,3368],{"type":606,"tag":636,"props":3338,"children":3339},{"style":648},[3340],{"type":612,"value":3341},"    logger.debug(",{"type":606,"tag":636,"props":3343,"children":3344},{"style":642},[3345],{"type":612,"value":1011},{"type":606,"tag":636,"props":3347,"children":3348},{"style":729},[3349],{"type":612,"value":3350},"\"API request details: ",{"type":606,"tag":636,"props":3352,"children":3353},{"style":695},[3354],{"type":612,"value":1021},{"type":606,"tag":636,"props":3356,"children":3357},{"style":648},[3358],{"type":612,"value":3359},"endpoint",{"type":606,"tag":636,"props":3361,"children":3362},{"style":695},[3363],{"type":612,"value":1031},{"type":606,"tag":636,"props":3365,"children":3366},{"style":729},[3367],{"type":612,"value":1054},{"type":606,"tag":636,"props":3369,"children":3370},{"style":648},[3371],{"type":612,"value":703},{"type":606,"tag":636,"props":3373,"children":3374},{"class":638,"line":190},[3375,3380,3384,3389,3393,3397,3401,3405],{"type":606,"tag":636,"props":3376,"children":3377},{"style":648},[3378],{"type":612,"value":3379},"    logger.info(",{"type":606,"tag":636,"props":3381,"children":3382},{"style":642},[3383],{"type":612,"value":1011},{"type":606,"tag":636,"props":3385,"children":3386},{"style":729},[3387],{"type":612,"value":3388},"\"Making API request to: ",{"type":606,"tag":636,"props":3390,"children":3391},{"style":695},[3392],{"type":612,"value":1021},{"type":606,"tag":636,"props":3394,"children":3395},{"style":648},[3396],{"type":612,"value":3359},{"type":606,"tag":636,"props":3398,"children":3399},{"style":695},[3400],{"type":612,"value":1031},{"type":606,"tag":636,"props":3402,"children":3403},{"style":729},[3404],{"type":612,"value":1054},{"type":606,"tag":636,"props":3406,"children":3407},{"style":648},[3408],{"type":612,"value":703},{"type":606,"tag":636,"props":3410,"children":3411},{"class":638,"line":199},[3412],{"type":606,"tag":636,"props":3413,"children":3414},{"style":648},[3415],{"type":612,"value":1066},{"type":606,"tag":636,"props":3417,"children":3418},{"class":638,"line":208},[3419,3423,3428,3433],{"type":606,"tag":636,"props":3420,"children":3421},{"style":642},[3422],{"type":612,"value":1074},{"type":606,"tag":636,"props":3424,"children":3425},{"style":648},[3426],{"type":612,"value":3427}," endpoint.startswith(",{"type":606,"tag":636,"props":3429,"children":3430},{"style":729},[3431],{"type":612,"value":3432},"\"/api/\"",{"type":606,"tag":636,"props":3434,"children":3435},{"style":648},[3436],{"type":612,"value":3437},"):\n",{"type":606,"tag":636,"props":3439,"children":3440},{"class":638,"line":217},[3441,3446,3451],{"type":606,"tag":636,"props":3442,"children":3443},{"style":648},[3444],{"type":612,"value":3445},"        logger.info(",{"type":606,"tag":636,"props":3447,"children":3448},{"style":729},[3449],{"type":612,"value":3450},"\"API request successful\"",{"type":606,"tag":636,"props":3452,"children":3453},{"style":648},[3454],{"type":612,"value":703},{"type":606,"tag":636,"props":3456,"children":3457},{"class":638,"line":227},[3458,3462,3466,3470,3474,3479],{"type":606,"tag":636,"props":3459,"children":3460},{"style":642},[3461],{"type":612,"value":1119},{"type":606,"tag":636,"props":3463,"children":3464},{"style":648},[3465],{"type":612,"value":1570},{"type":606,"tag":636,"props":3467,"children":3468},{"style":729},[3469],{"type":612,"value":1575},{"type":606,"tag":636,"props":3471,"children":3472},{"style":648},[3473],{"type":612,"value":1580},{"type":606,"tag":636,"props":3475,"children":3476},{"style":729},[3477],{"type":612,"value":3478},"\"success\"",{"type":606,"tag":636,"props":3480,"children":3481},{"style":648},[3482],{"type":612,"value":1590},{"type":606,"tag":636,"props":3484,"children":3485},{"class":638,"line":236},[3486,3490],{"type":606,"tag":636,"props":3487,"children":3488},{"style":642},[3489],{"type":612,"value":2512},{"type":606,"tag":636,"props":3491,"children":3492},{"style":648},[3493],{"type":612,"value":1094},{"type":606,"tag":636,"props":3495,"children":3496},{"class":638,"line":245},[3497,3502,3507],{"type":606,"tag":636,"props":3498,"children":3499},{"style":648},[3500],{"type":612,"value":3501},"        logger.error(",{"type":606,"tag":636,"props":3503,"children":3504},{"style":729},[3505],{"type":612,"value":3506},"\"Invalid API endpoint\"",{"type":606,"tag":636,"props":3508,"children":3509},{"style":648},[3510],{"type":612,"value":703},{"type":606,"tag":636,"props":3512,"children":3513},{"class":638,"line":254},[3514,3518,3522,3526,3530,3535],{"type":606,"tag":636,"props":3515,"children":3516},{"style":642},[3517],{"type":612,"value":1119},{"type":606,"tag":636,"props":3519,"children":3520},{"style":648},[3521],{"type":612,"value":1570},{"type":606,"tag":636,"props":3523,"children":3524},{"style":729},[3525],{"type":612,"value":1575},{"type":606,"tag":636,"props":3527,"children":3528},{"style":648},[3529],{"type":612,"value":1580},{"type":606,"tag":636,"props":3531,"children":3532},{"style":729},[3533],{"type":612,"value":3534},"\"error\"",{"type":606,"tag":636,"props":3536,"children":3537},{"style":648},[3538],{"type":612,"value":1590},{"type":606,"tag":636,"props":3540,"children":3541},{"class":638,"line":263},[3542],{"type":606,"tag":636,"props":3543,"children":3544},{"emptyLinePlaceholder":13},[3545],{"type":612,"value":659},{"type":606,"tag":636,"props":3547,"children":3548},{"class":638,"line":272},[3549],{"type":606,"tag":636,"props":3550,"children":3551},{"style":665},[3552],{"type":612,"value":3553},"# Test API requests\n",{"type":606,"tag":636,"props":3555,"children":3556},{"class":638,"line":281},[3557,3562,3567],{"type":606,"tag":636,"props":3558,"children":3559},{"style":648},[3560],{"type":612,"value":3561},"api_request(",{"type":606,"tag":636,"props":3563,"children":3564},{"style":729},[3565],{"type":612,"value":3566},"\"/api/users\"",{"type":606,"tag":636,"props":3568,"children":3569},{"style":648},[3570],{"type":612,"value":703},{"type":606,"tag":636,"props":3572,"children":3573},{"class":638,"line":291},[3574,3578,3583],{"type":606,"tag":636,"props":3575,"children":3576},{"style":648},[3577],{"type":612,"value":3561},{"type":606,"tag":636,"props":3579,"children":3580},{"style":729},[3581],{"type":612,"value":3582},"\"/invalid/endpoint\"",{"type":606,"tag":636,"props":3584,"children":3585},{"style":648},[3586],{"type":612,"value":703},{"type":606,"tag":807,"props":3588,"children":3590},{"id":3589},"logging-configuration-options",[3591],{"type":612,"value":3592},"📊 Logging Configuration Options",{"type":606,"tag":904,"props":3594,"children":3596},{"id":3595},"basic-configuration-parameters",[3597],{"type":612,"value":3598},"Basic Configuration Parameters",{"type":606,"tag":2114,"props":3600,"children":3601},{},[3602,3623],{"type":606,"tag":2118,"props":3603,"children":3604},{},[3605],{"type":606,"tag":2122,"props":3606,"children":3607},{},[3608,3613,3618],{"type":606,"tag":2126,"props":3609,"children":3610},{},[3611],{"type":612,"value":3612},"Parameter",{"type":606,"tag":2126,"props":3614,"children":3615},{},[3616],{"type":612,"value":3617},"Purpose",{"type":606,"tag":2126,"props":3619,"children":3620},{},[3621],{"type":612,"value":3622},"Example",{"type":606,"tag":2142,"props":3624,"children":3625},{},[3626,3651,3677,3702],{"type":606,"tag":2122,"props":3627,"children":3628},{},[3629,3637,3642],{"type":606,"tag":2149,"props":3630,"children":3631},{},[3632],{"type":606,"tag":632,"props":3633,"children":3635},{"className":3634},[],[3636],{"type":612,"value":682},{"type":606,"tag":2149,"props":3638,"children":3639},{},[3640],{"type":612,"value":3641},"Minimum log level",{"type":606,"tag":2149,"props":3643,"children":3644},{},[3645],{"type":606,"tag":632,"props":3646,"children":3648},{"className":3647},[],[3649],{"type":612,"value":3650},"logging.INFO",{"type":606,"tag":2122,"props":3652,"children":3653},{},[3654,3663,3668],{"type":606,"tag":2149,"props":3655,"children":3656},{},[3657],{"type":606,"tag":632,"props":3658,"children":3660},{"className":3659},[],[3661],{"type":612,"value":3662},"format",{"type":606,"tag":2149,"props":3664,"children":3665},{},[3666],{"type":612,"value":3667},"Message format",{"type":606,"tag":2149,"props":3669,"children":3670},{},[3671],{"type":606,"tag":632,"props":3672,"children":3674},{"className":3673},[],[3675],{"type":612,"value":3676},"'%(levelname)s - %(message)s'",{"type":606,"tag":2122,"props":3678,"children":3679},{},[3680,3688,3693],{"type":606,"tag":2149,"props":3681,"children":3682},{},[3683],{"type":606,"tag":632,"props":3684,"children":3686},{"className":3685},[],[3687],{"type":612,"value":1816},{"type":606,"tag":2149,"props":3689,"children":3690},{},[3691],{"type":612,"value":3692},"Log to file",{"type":606,"tag":2149,"props":3694,"children":3695},{},[3696],{"type":606,"tag":632,"props":3697,"children":3699},{"className":3698},[],[3700],{"type":612,"value":3701},"'app.log'",{"type":606,"tag":2122,"props":3703,"children":3704},{},[3705,3714,3719],{"type":606,"tag":2149,"props":3706,"children":3707},{},[3708],{"type":606,"tag":632,"props":3709,"children":3711},{"className":3710},[],[3712],{"type":612,"value":3713},"filemode",{"type":606,"tag":2149,"props":3715,"children":3716},{},[3717],{"type":612,"value":3718},"File mode",{"type":606,"tag":2149,"props":3720,"children":3721},{},[3722,3728,3730,3736],{"type":606,"tag":632,"props":3723,"children":3725},{"className":3724},[],[3726],{"type":612,"value":3727},"'a'",{"type":612,"value":3729}," (append) or ",{"type":606,"tag":632,"props":3731,"children":3733},{"className":3732},[],[3734],{"type":612,"value":3735},"'w'",{"type":612,"value":3737}," (write)",{"type":606,"tag":904,"props":3739,"children":3741},{"id":3740},"format-specifiers",[3742],{"type":612,"value":3743},"Format Specifiers",{"type":606,"tag":2114,"props":3745,"children":3746},{},[3747,3767],{"type":606,"tag":2118,"props":3748,"children":3749},{},[3750],{"type":606,"tag":2122,"props":3751,"children":3752},{},[3753,3758,3763],{"type":606,"tag":2126,"props":3754,"children":3755},{},[3756],{"type":612,"value":3757},"Specifier",{"type":606,"tag":2126,"props":3759,"children":3760},{},[3761],{"type":612,"value":3762},"Meaning",{"type":606,"tag":2126,"props":3764,"children":3765},{},[3766],{"type":612,"value":3622},{"type":606,"tag":2142,"props":3768,"children":3769},{},[3770,3795,3819,3844,3869,3895],{"type":606,"tag":2122,"props":3771,"children":3772},{},[3773,3781,3786],{"type":606,"tag":2149,"props":3774,"children":3775},{},[3776],{"type":606,"tag":632,"props":3777,"children":3779},{"className":3778},[],[3780],{"type":612,"value":2352},{"type":606,"tag":2149,"props":3782,"children":3783},{},[3784],{"type":612,"value":3785},"Timestamp",{"type":606,"tag":2149,"props":3787,"children":3788},{},[3789],{"type":606,"tag":632,"props":3790,"children":3792},{"className":3791},[],[3793],{"type":612,"value":3794},"2024-03-15 14:30:45,123",{"type":606,"tag":2122,"props":3796,"children":3797},{},[3798,3806,3811],{"type":606,"tag":2149,"props":3799,"children":3800},{},[3801],{"type":606,"tag":632,"props":3802,"children":3804},{"className":3803},[],[3805],{"type":612,"value":2362},{"type":606,"tag":2149,"props":3807,"children":3808},{},[3809],{"type":612,"value":3810},"Log level",{"type":606,"tag":2149,"props":3812,"children":3813},{},[3814],{"type":606,"tag":632,"props":3815,"children":3817},{"className":3816},[],[3818],{"type":612,"value":698},{"type":606,"tag":2122,"props":3820,"children":3821},{},[3822,3830,3835],{"type":606,"tag":2149,"props":3823,"children":3824},{},[3825],{"type":606,"tag":632,"props":3826,"children":3828},{"className":3827},[],[3829],{"type":612,"value":2371},{"type":606,"tag":2149,"props":3831,"children":3832},{},[3833],{"type":612,"value":3834},"Log message",{"type":606,"tag":2149,"props":3836,"children":3837},{},[3838],{"type":606,"tag":632,"props":3839,"children":3841},{"className":3840},[],[3842],{"type":612,"value":3843},"User logged in",{"type":606,"tag":2122,"props":3845,"children":3846},{},[3847,3855,3860],{"type":606,"tag":2149,"props":3848,"children":3849},{},[3850],{"type":606,"tag":632,"props":3851,"children":3853},{"className":3852},[],[3854],{"type":612,"value":3254},{"type":606,"tag":2149,"props":3856,"children":3857},{},[3858],{"type":612,"value":3859},"Logger name",{"type":606,"tag":2149,"props":3861,"children":3862},{},[3863],{"type":606,"tag":632,"props":3864,"children":3866},{"className":3865},[],[3867],{"type":612,"value":3868},"my_app",{"type":606,"tag":2122,"props":3870,"children":3871},{},[3872,3881,3886],{"type":606,"tag":2149,"props":3873,"children":3874},{},[3875],{"type":606,"tag":632,"props":3876,"children":3878},{"className":3877},[],[3879],{"type":612,"value":3880},"%(filename)s",{"type":606,"tag":2149,"props":3882,"children":3883},{},[3884],{"type":612,"value":3885},"Source filename",{"type":606,"tag":2149,"props":3887,"children":3888},{},[3889],{"type":606,"tag":632,"props":3890,"children":3892},{"className":3891},[],[3893],{"type":612,"value":3894},"main.py",{"type":606,"tag":2122,"props":3896,"children":3897},{},[3898,3907,3912],{"type":606,"tag":2149,"props":3899,"children":3900},{},[3901],{"type":606,"tag":632,"props":3902,"children":3904},{"className":3903},[],[3905],{"type":612,"value":3906},"%(lineno)d",{"type":606,"tag":2149,"props":3908,"children":3909},{},[3910],{"type":612,"value":3911},"Line number",{"type":606,"tag":2149,"props":3913,"children":3914},{},[3915],{"type":606,"tag":632,"props":3916,"children":3918},{"className":3917},[],[3919],{"type":612,"value":3920},"42",{"type":606,"tag":807,"props":3922,"children":3924},{"id":3923},"️-practical-logging-examples",[3925],{"type":612,"value":3926},"🛠️ Practical Logging Examples",{"type":606,"tag":904,"props":3928,"children":3930},{"id":3929},"application-startup-logging",[3931],{"type":612,"value":3932},"Application Startup Logging",{"type":606,"tag":621,"props":3934,"children":3935},{},[3936],{"type":606,"tag":625,"props":3937,"children":3939},{"className":627,"code":3938,"language":629,"meta":8,"style":8},"import logging\n\n# Configure application logging\nlogging.basicConfig(\n    level=logging.INFO,\n    format='%(asctime)s - %(levelname)s - %(message)s'\n)\n\ndef initialize_application():\n    logging.info(\"Application starting up\")\n    \n    # Initialize components\n    components = [\"database\", \"cache\", \"api_server\"]\n    \n    for component in components:\n        logging.info(f\"Initializing {component}\")\n        \n        # Simulate initialization\n        if component == \"database\":\n            logging.info(\"Database connection established\")\n        elif component == \"cache\":\n            logging.warning(\"Cache server running on backup port\")\n        elif component == \"api_server\":\n            logging.info(\"API server started on port 8080\")\n    \n    logging.info(\"Application startup completed\")\n\ninitialize_application()\n",[3940],{"type":606,"tag":632,"props":3941,"children":3942},{"__ignoreMap":8},[3943,3954,3961,3969,3976,3999,4038,4045,4052,4069,4085,4092,4100,4145,4152,4175,4212,4220,4228,4252,4268,4293,4310,4334,4350,4357,4373,4380],{"type":606,"tag":636,"props":3944,"children":3945},{"class":638,"line":12},[3946,3950],{"type":606,"tag":636,"props":3947,"children":3948},{"style":642},[3949],{"type":612,"value":645},{"type":606,"tag":636,"props":3951,"children":3952},{"style":648},[3953],{"type":612,"value":651},{"type":606,"tag":636,"props":3955,"children":3956},{"class":638,"line":27},[3957],{"type":606,"tag":636,"props":3958,"children":3959},{"emptyLinePlaceholder":13},[3960],{"type":612,"value":659},{"type":606,"tag":636,"props":3962,"children":3963},{"class":638,"line":36},[3964],{"type":606,"tag":636,"props":3965,"children":3966},{"style":665},[3967],{"type":612,"value":3968},"# Configure application logging\n",{"type":606,"tag":636,"props":3970,"children":3971},{"class":638,"line":45},[3972],{"type":606,"tag":636,"props":3973,"children":3974},{"style":648},[3975],{"type":612,"value":2305},{"type":606,"tag":636,"props":3977,"children":3978},{"class":638,"line":54},[3979,3983,3987,3991,3995],{"type":606,"tag":636,"props":3980,"children":3981},{"style":679},[3982],{"type":612,"value":2313},{"type":606,"tag":636,"props":3984,"children":3985},{"style":642},[3986],{"type":612,"value":687},{"type":606,"tag":636,"props":3988,"children":3989},{"style":648},[3990],{"type":612,"value":692},{"type":606,"tag":636,"props":3992,"children":3993},{"style":695},[3994],{"type":612,"value":698},{"type":606,"tag":636,"props":3996,"children":3997},{"style":648},[3998],{"type":612,"value":2330},{"type":606,"tag":636,"props":4000,"children":4001},{"class":638,"line":63},[4002,4006,4010,4014,4018,4022,4026,4030,4034],{"type":606,"tag":636,"props":4003,"children":4004},{"style":679},[4005],{"type":612,"value":2338},{"type":606,"tag":636,"props":4007,"children":4008},{"style":642},[4009],{"type":612,"value":687},{"type":606,"tag":636,"props":4011,"children":4012},{"style":729},[4013],{"type":612,"value":2347},{"type":606,"tag":636,"props":4015,"children":4016},{"style":695},[4017],{"type":612,"value":2352},{"type":606,"tag":636,"props":4019,"children":4020},{"style":729},[4021],{"type":612,"value":2357},{"type":606,"tag":636,"props":4023,"children":4024},{"style":695},[4025],{"type":612,"value":2362},{"type":606,"tag":636,"props":4027,"children":4028},{"style":729},[4029],{"type":612,"value":2357},{"type":606,"tag":636,"props":4031,"children":4032},{"style":695},[4033],{"type":612,"value":2371},{"type":606,"tag":636,"props":4035,"children":4036},{"style":729},[4037],{"type":612,"value":2376},{"type":606,"tag":636,"props":4039,"children":4040},{"class":638,"line":72},[4041],{"type":606,"tag":636,"props":4042,"children":4043},{"style":648},[4044],{"type":612,"value":703},{"type":606,"tag":636,"props":4046,"children":4047},{"class":638,"line":81},[4048],{"type":606,"tag":636,"props":4049,"children":4050},{"emptyLinePlaceholder":13},[4051],{"type":612,"value":659},{"type":606,"tag":636,"props":4053,"children":4054},{"class":638,"line":756},[4055,4059,4064],{"type":606,"tag":636,"props":4056,"children":4057},{"style":642},[4058],{"type":612,"value":987},{"type":606,"tag":636,"props":4060,"children":4061},{"style":990},[4062],{"type":612,"value":4063}," initialize_application",{"type":606,"tag":636,"props":4065,"children":4066},{"style":648},[4067],{"type":612,"value":4068},"():\n",{"type":606,"tag":636,"props":4070,"children":4071},{"class":638,"line":99},[4072,4076,4081],{"type":606,"tag":636,"props":4073,"children":4074},{"style":648},[4075],{"type":612,"value":1006},{"type":606,"tag":636,"props":4077,"children":4078},{"style":729},[4079],{"type":612,"value":4080},"\"Application starting up\"",{"type":606,"tag":636,"props":4082,"children":4083},{"style":648},[4084],{"type":612,"value":703},{"type":606,"tag":636,"props":4086,"children":4087},{"class":638,"line":108},[4088],{"type":606,"tag":636,"props":4089,"children":4090},{"style":648},[4091],{"type":612,"value":1066},{"type":606,"tag":636,"props":4093,"children":4094},{"class":638,"line":117},[4095],{"type":606,"tag":636,"props":4096,"children":4097},{"style":665},[4098],{"type":612,"value":4099},"    # Initialize components\n",{"type":606,"tag":636,"props":4101,"children":4102},{"class":638,"line":126},[4103,4108,4112,4117,4122,4126,4131,4135,4140],{"type":606,"tag":636,"props":4104,"children":4105},{"style":648},[4106],{"type":612,"value":4107},"    components ",{"type":606,"tag":636,"props":4109,"children":4110},{"style":642},[4111],{"type":612,"value":687},{"type":606,"tag":636,"props":4113,"children":4114},{"style":648},[4115],{"type":612,"value":4116}," [",{"type":606,"tag":636,"props":4118,"children":4119},{"style":729},[4120],{"type":612,"value":4121},"\"database\"",{"type":606,"tag":636,"props":4123,"children":4124},{"style":648},[4125],{"type":612,"value":1250},{"type":606,"tag":636,"props":4127,"children":4128},{"style":729},[4129],{"type":612,"value":4130},"\"cache\"",{"type":606,"tag":636,"props":4132,"children":4133},{"style":648},[4134],{"type":612,"value":1250},{"type":606,"tag":636,"props":4136,"children":4137},{"style":729},[4138],{"type":612,"value":4139},"\"api_server\"",{"type":606,"tag":636,"props":4141,"children":4142},{"style":648},[4143],{"type":612,"value":4144},"]\n",{"type":606,"tag":636,"props":4146,"children":4147},{"class":638,"line":135},[4148],{"type":606,"tag":636,"props":4149,"children":4150},{"style":648},[4151],{"type":612,"value":1066},{"type":606,"tag":636,"props":4153,"children":4154},{"class":638,"line":144},[4155,4160,4165,4170],{"type":606,"tag":636,"props":4156,"children":4157},{"style":642},[4158],{"type":612,"value":4159},"    for",{"type":606,"tag":636,"props":4161,"children":4162},{"style":648},[4163],{"type":612,"value":4164}," component ",{"type":606,"tag":636,"props":4166,"children":4167},{"style":642},[4168],{"type":612,"value":4169},"in",{"type":606,"tag":636,"props":4171,"children":4172},{"style":648},[4173],{"type":612,"value":4174}," components:\n",{"type":606,"tag":636,"props":4176,"children":4177},{"class":638,"line":153},[4178,4182,4186,4191,4195,4200,4204,4208],{"type":606,"tag":636,"props":4179,"children":4180},{"style":648},[4181],{"type":612,"value":1798},{"type":606,"tag":636,"props":4183,"children":4184},{"style":642},[4185],{"type":612,"value":1011},{"type":606,"tag":636,"props":4187,"children":4188},{"style":729},[4189],{"type":612,"value":4190},"\"Initializing ",{"type":606,"tag":636,"props":4192,"children":4193},{"style":695},[4194],{"type":612,"value":1021},{"type":606,"tag":636,"props":4196,"children":4197},{"style":648},[4198],{"type":612,"value":4199},"component",{"type":606,"tag":636,"props":4201,"children":4202},{"style":695},[4203],{"type":612,"value":1031},{"type":606,"tag":636,"props":4205,"children":4206},{"style":729},[4207],{"type":612,"value":1054},{"type":606,"tag":636,"props":4209,"children":4210},{"style":648},[4211],{"type":612,"value":703},{"type":606,"tag":636,"props":4213,"children":4214},{"class":638,"line":163},[4215],{"type":606,"tag":636,"props":4216,"children":4217},{"style":648},[4218],{"type":612,"value":4219},"        \n",{"type":606,"tag":636,"props":4221,"children":4222},{"class":638,"line":172},[4223],{"type":606,"tag":636,"props":4224,"children":4225},{"style":665},[4226],{"type":612,"value":4227},"        # Simulate initialization\n",{"type":606,"tag":636,"props":4229,"children":4230},{"class":638,"line":181},[4231,4235,4239,4243,4248],{"type":606,"tag":636,"props":4232,"children":4233},{"style":642},[4234],{"type":612,"value":2863},{"type":606,"tag":636,"props":4236,"children":4237},{"style":648},[4238],{"type":612,"value":4164},{"type":606,"tag":636,"props":4240,"children":4241},{"style":642},[4242],{"type":612,"value":1084},{"type":606,"tag":636,"props":4244,"children":4245},{"style":729},[4246],{"type":612,"value":4247}," \"database\"",{"type":606,"tag":636,"props":4249,"children":4250},{"style":648},[4251],{"type":612,"value":1094},{"type":606,"tag":636,"props":4253,"children":4254},{"class":638,"line":190},[4255,4259,4264],{"type":606,"tag":636,"props":4256,"children":4257},{"style":648},[4258],{"type":612,"value":1899},{"type":606,"tag":636,"props":4260,"children":4261},{"style":729},[4262],{"type":612,"value":4263},"\"Database connection established\"",{"type":606,"tag":636,"props":4265,"children":4266},{"style":648},[4267],{"type":612,"value":703},{"type":606,"tag":636,"props":4269,"children":4270},{"class":638,"line":199},[4271,4276,4280,4284,4289],{"type":606,"tag":636,"props":4272,"children":4273},{"style":642},[4274],{"type":612,"value":4275},"        elif",{"type":606,"tag":636,"props":4277,"children":4278},{"style":648},[4279],{"type":612,"value":4164},{"type":606,"tag":636,"props":4281,"children":4282},{"style":642},[4283],{"type":612,"value":1084},{"type":606,"tag":636,"props":4285,"children":4286},{"style":729},[4287],{"type":612,"value":4288}," \"cache\"",{"type":606,"tag":636,"props":4290,"children":4291},{"style":648},[4292],{"type":612,"value":1094},{"type":606,"tag":636,"props":4294,"children":4295},{"class":638,"line":208},[4296,4301,4306],{"type":606,"tag":636,"props":4297,"children":4298},{"style":648},[4299],{"type":612,"value":4300},"            logging.warning(",{"type":606,"tag":636,"props":4302,"children":4303},{"style":729},[4304],{"type":612,"value":4305},"\"Cache server running on backup port\"",{"type":606,"tag":636,"props":4307,"children":4308},{"style":648},[4309],{"type":612,"value":703},{"type":606,"tag":636,"props":4311,"children":4312},{"class":638,"line":217},[4313,4317,4321,4325,4330],{"type":606,"tag":636,"props":4314,"children":4315},{"style":642},[4316],{"type":612,"value":4275},{"type":606,"tag":636,"props":4318,"children":4319},{"style":648},[4320],{"type":612,"value":4164},{"type":606,"tag":636,"props":4322,"children":4323},{"style":642},[4324],{"type":612,"value":1084},{"type":606,"tag":636,"props":4326,"children":4327},{"style":729},[4328],{"type":612,"value":4329}," \"api_server\"",{"type":606,"tag":636,"props":4331,"children":4332},{"style":648},[4333],{"type":612,"value":1094},{"type":606,"tag":636,"props":4335,"children":4336},{"class":638,"line":227},[4337,4341,4346],{"type":606,"tag":636,"props":4338,"children":4339},{"style":648},[4340],{"type":612,"value":1899},{"type":606,"tag":636,"props":4342,"children":4343},{"style":729},[4344],{"type":612,"value":4345},"\"API server started on port 8080\"",{"type":606,"tag":636,"props":4347,"children":4348},{"style":648},[4349],{"type":612,"value":703},{"type":606,"tag":636,"props":4351,"children":4352},{"class":638,"line":236},[4353],{"type":606,"tag":636,"props":4354,"children":4355},{"style":648},[4356],{"type":612,"value":1066},{"type":606,"tag":636,"props":4358,"children":4359},{"class":638,"line":245},[4360,4364,4369],{"type":606,"tag":636,"props":4361,"children":4362},{"style":648},[4363],{"type":612,"value":1006},{"type":606,"tag":636,"props":4365,"children":4366},{"style":729},[4367],{"type":612,"value":4368},"\"Application startup completed\"",{"type":606,"tag":636,"props":4370,"children":4371},{"style":648},[4372],{"type":612,"value":703},{"type":606,"tag":636,"props":4374,"children":4375},{"class":638,"line":254},[4376],{"type":606,"tag":636,"props":4377,"children":4378},{"emptyLinePlaceholder":13},[4379],{"type":612,"value":659},{"type":606,"tag":636,"props":4381,"children":4382},{"class":638,"line":263},[4383],{"type":606,"tag":636,"props":4384,"children":4385},{"style":648},[4386],{"type":612,"value":4387},"initialize_application()\n",{"type":606,"tag":904,"props":4389,"children":4391},{"id":4390},"error-tracking",[4392],{"type":612,"value":4393},"Error Tracking",{"type":606,"tag":621,"props":4395,"children":4396},{},[4397],{"type":606,"tag":625,"props":4398,"children":4400},{"className":627,"code":4399,"language":629,"meta":8,"style":8},"import logging\n\nlogging.basicConfig(level=logging.INFO)\n\ndef process_orders(orders):\n    logging.info(f\"Processing {len(orders)} orders\")\n    \n    processed = 0\n    errors = 0\n    \n    for order_id, order in enumerate(orders, 1):\n        try:\n            logging.debug(f\"Processing order {order_id}: {order}\")\n            \n            if \"total\" not in order:\n                raise ValueError(\"Missing total amount\")\n            \n            if order[\"total\"] \u003C= 0:\n                raise ValueError(\"Invalid total amount\")\n            \n            processed += 1\n            logging.info(f\"Order {order_id} processed successfully\")\n            \n        except ValueError as e:\n            errors += 1\n            logging.error(f\"Order {order_id} failed: {e}\")\n        except Exception as e:\n            errors += 1\n            logging.exception(f\"Unexpected error in order {order_id}\")\n    \n    logging.info(f\"Order processing complete: {processed} successful, {errors} errors\")\n\n# Test order processing\norders = [\n    {\"id\": 1, \"total\": 25.99},\n    {\"id\": 2, \"total\": -5.00},  # Invalid amount\n    {\"id\": 3, \"product\": \"item\"}  # Missing total\n]\n\nprocess_orders(orders)\n",[4401],{"type":606,"tag":632,"props":4402,"children":4403},{"__ignoreMap":8},[4404,4415,4422,4449,4456,4473,4512,4519,4536,4552,4559,4594,4606,4661,4669,4695,4722,4729,4764,4788,4795,4813,4850,4857,4877,4893,4946,4965,4980,5017,5024,5080,5087,5095,5112,5155,5206,5254,5261,5268],{"type":606,"tag":636,"props":4405,"children":4406},{"class":638,"line":12},[4407,4411],{"type":606,"tag":636,"props":4408,"children":4409},{"style":642},[4410],{"type":612,"value":645},{"type":606,"tag":636,"props":4412,"children":4413},{"style":648},[4414],{"type":612,"value":651},{"type":606,"tag":636,"props":4416,"children":4417},{"class":638,"line":27},[4418],{"type":606,"tag":636,"props":4419,"children":4420},{"emptyLinePlaceholder":13},[4421],{"type":612,"value":659},{"type":606,"tag":636,"props":4423,"children":4424},{"class":638,"line":36},[4425,4429,4433,4437,4441,4445],{"type":606,"tag":636,"props":4426,"children":4427},{"style":648},[4428],{"type":612,"value":676},{"type":606,"tag":636,"props":4430,"children":4431},{"style":679},[4432],{"type":612,"value":682},{"type":606,"tag":636,"props":4434,"children":4435},{"style":642},[4436],{"type":612,"value":687},{"type":606,"tag":636,"props":4438,"children":4439},{"style":648},[4440],{"type":612,"value":692},{"type":606,"tag":636,"props":4442,"children":4443},{"style":695},[4444],{"type":612,"value":698},{"type":606,"tag":636,"props":4446,"children":4447},{"style":648},[4448],{"type":612,"value":703},{"type":606,"tag":636,"props":4450,"children":4451},{"class":638,"line":45},[4452],{"type":606,"tag":636,"props":4453,"children":4454},{"emptyLinePlaceholder":13},[4455],{"type":612,"value":659},{"type":606,"tag":636,"props":4457,"children":4458},{"class":638,"line":54},[4459,4463,4468],{"type":606,"tag":636,"props":4460,"children":4461},{"style":642},[4462],{"type":612,"value":987},{"type":606,"tag":636,"props":4464,"children":4465},{"style":990},[4466],{"type":612,"value":4467}," process_orders",{"type":606,"tag":636,"props":4469,"children":4470},{"style":648},[4471],{"type":612,"value":4472},"(orders):\n",{"type":606,"tag":636,"props":4474,"children":4475},{"class":638,"line":63},[4476,4480,4484,4489,4494,4499,4503,4508],{"type":606,"tag":636,"props":4477,"children":4478},{"style":648},[4479],{"type":612,"value":1006},{"type":606,"tag":636,"props":4481,"children":4482},{"style":642},[4483],{"type":612,"value":1011},{"type":606,"tag":636,"props":4485,"children":4486},{"style":729},[4487],{"type":612,"value":4488},"\"Processing ",{"type":606,"tag":636,"props":4490,"children":4491},{"style":695},[4492],{"type":612,"value":4493},"{len",{"type":606,"tag":636,"props":4495,"children":4496},{"style":648},[4497],{"type":612,"value":4498},"(orders)",{"type":606,"tag":636,"props":4500,"children":4501},{"style":695},[4502],{"type":612,"value":1031},{"type":606,"tag":636,"props":4504,"children":4505},{"style":729},[4506],{"type":612,"value":4507}," orders\"",{"type":606,"tag":636,"props":4509,"children":4510},{"style":648},[4511],{"type":612,"value":703},{"type":606,"tag":636,"props":4513,"children":4514},{"class":638,"line":72},[4515],{"type":606,"tag":636,"props":4516,"children":4517},{"style":648},[4518],{"type":612,"value":1066},{"type":606,"tag":636,"props":4520,"children":4521},{"class":638,"line":81},[4522,4527,4531],{"type":606,"tag":636,"props":4523,"children":4524},{"style":648},[4525],{"type":612,"value":4526},"    processed ",{"type":606,"tag":636,"props":4528,"children":4529},{"style":642},[4530],{"type":612,"value":687},{"type":606,"tag":636,"props":4532,"children":4533},{"style":695},[4534],{"type":612,"value":4535}," 0\n",{"type":606,"tag":636,"props":4537,"children":4538},{"class":638,"line":756},[4539,4544,4548],{"type":606,"tag":636,"props":4540,"children":4541},{"style":648},[4542],{"type":612,"value":4543},"    errors ",{"type":606,"tag":636,"props":4545,"children":4546},{"style":642},[4547],{"type":612,"value":687},{"type":606,"tag":636,"props":4549,"children":4550},{"style":695},[4551],{"type":612,"value":4535},{"type":606,"tag":636,"props":4553,"children":4554},{"class":638,"line":99},[4555],{"type":606,"tag":636,"props":4556,"children":4557},{"style":648},[4558],{"type":612,"value":1066},{"type":606,"tag":636,"props":4560,"children":4561},{"class":638,"line":108},[4562,4566,4571,4575,4580,4585,4590],{"type":606,"tag":636,"props":4563,"children":4564},{"style":642},[4565],{"type":612,"value":4159},{"type":606,"tag":636,"props":4567,"children":4568},{"style":648},[4569],{"type":612,"value":4570}," order_id, order ",{"type":606,"tag":636,"props":4572,"children":4573},{"style":642},[4574],{"type":612,"value":4169},{"type":606,"tag":636,"props":4576,"children":4577},{"style":695},[4578],{"type":612,"value":4579}," enumerate",{"type":606,"tag":636,"props":4581,"children":4582},{"style":648},[4583],{"type":612,"value":4584},"(orders, ",{"type":606,"tag":636,"props":4586,"children":4587},{"style":695},[4588],{"type":612,"value":4589},"1",{"type":606,"tag":636,"props":4591,"children":4592},{"style":648},[4593],{"type":612,"value":3437},{"type":606,"tag":636,"props":4595,"children":4596},{"class":638,"line":117},[4597,4602],{"type":606,"tag":636,"props":4598,"children":4599},{"style":642},[4600],{"type":612,"value":4601},"        try",{"type":606,"tag":636,"props":4603,"children":4604},{"style":648},[4605],{"type":612,"value":1094},{"type":606,"tag":636,"props":4607,"children":4608},{"class":638,"line":126},[4609,4614,4618,4623,4627,4632,4636,4640,4644,4649,4653,4657],{"type":606,"tag":636,"props":4610,"children":4611},{"style":648},[4612],{"type":612,"value":4613},"            logging.debug(",{"type":606,"tag":636,"props":4615,"children":4616},{"style":642},[4617],{"type":612,"value":1011},{"type":606,"tag":636,"props":4619,"children":4620},{"style":729},[4621],{"type":612,"value":4622},"\"Processing order ",{"type":606,"tag":636,"props":4624,"children":4625},{"style":695},[4626],{"type":612,"value":1021},{"type":606,"tag":636,"props":4628,"children":4629},{"style":648},[4630],{"type":612,"value":4631},"order_id",{"type":606,"tag":636,"props":4633,"children":4634},{"style":695},[4635],{"type":612,"value":1031},{"type":606,"tag":636,"props":4637,"children":4638},{"style":729},[4639],{"type":612,"value":1580},{"type":606,"tag":636,"props":4641,"children":4642},{"style":695},[4643],{"type":612,"value":1021},{"type":606,"tag":636,"props":4645,"children":4646},{"style":648},[4647],{"type":612,"value":4648},"order",{"type":606,"tag":636,"props":4650,"children":4651},{"style":695},[4652],{"type":612,"value":1031},{"type":606,"tag":636,"props":4654,"children":4655},{"style":729},[4656],{"type":612,"value":1054},{"type":606,"tag":636,"props":4658,"children":4659},{"style":648},[4660],{"type":612,"value":703},{"type":606,"tag":636,"props":4662,"children":4663},{"class":638,"line":135},[4664],{"type":606,"tag":636,"props":4665,"children":4666},{"style":648},[4667],{"type":612,"value":4668},"            \n",{"type":606,"tag":636,"props":4670,"children":4671},{"class":638,"line":144},[4672,4677,4682,4686,4690],{"type":606,"tag":636,"props":4673,"children":4674},{"style":642},[4675],{"type":612,"value":4676},"            if",{"type":606,"tag":636,"props":4678,"children":4679},{"style":729},[4680],{"type":612,"value":4681}," \"total\"",{"type":606,"tag":636,"props":4683,"children":4684},{"style":642},[4685],{"type":612,"value":1442},{"type":606,"tag":636,"props":4687,"children":4688},{"style":642},[4689],{"type":612,"value":1504},{"type":606,"tag":636,"props":4691,"children":4692},{"style":648},[4693],{"type":612,"value":4694}," order:\n",{"type":606,"tag":636,"props":4696,"children":4697},{"class":638,"line":153},[4698,4703,4708,4713,4718],{"type":606,"tag":636,"props":4699,"children":4700},{"style":642},[4701],{"type":612,"value":4702},"                raise",{"type":606,"tag":636,"props":4704,"children":4705},{"style":695},[4706],{"type":612,"value":4707}," ValueError",{"type":606,"tag":636,"props":4709,"children":4710},{"style":648},[4711],{"type":612,"value":4712},"(",{"type":606,"tag":636,"props":4714,"children":4715},{"style":729},[4716],{"type":612,"value":4717},"\"Missing total amount\"",{"type":606,"tag":636,"props":4719,"children":4720},{"style":648},[4721],{"type":612,"value":703},{"type":606,"tag":636,"props":4723,"children":4724},{"class":638,"line":163},[4725],{"type":606,"tag":636,"props":4726,"children":4727},{"style":648},[4728],{"type":612,"value":4668},{"type":606,"tag":636,"props":4730,"children":4731},{"class":638,"line":172},[4732,4736,4741,4746,4751,4756,4760],{"type":606,"tag":636,"props":4733,"children":4734},{"style":642},[4735],{"type":612,"value":4676},{"type":606,"tag":636,"props":4737,"children":4738},{"style":648},[4739],{"type":612,"value":4740}," order[",{"type":606,"tag":636,"props":4742,"children":4743},{"style":729},[4744],{"type":612,"value":4745},"\"total\"",{"type":606,"tag":636,"props":4747,"children":4748},{"style":648},[4749],{"type":612,"value":4750},"] ",{"type":606,"tag":636,"props":4752,"children":4753},{"style":642},[4754],{"type":612,"value":4755},"\u003C=",{"type":606,"tag":636,"props":4757,"children":4758},{"style":695},[4759],{"type":612,"value":1089},{"type":606,"tag":636,"props":4761,"children":4762},{"style":648},[4763],{"type":612,"value":1094},{"type":606,"tag":636,"props":4765,"children":4766},{"class":638,"line":181},[4767,4771,4775,4779,4784],{"type":606,"tag":636,"props":4768,"children":4769},{"style":642},[4770],{"type":612,"value":4702},{"type":606,"tag":636,"props":4772,"children":4773},{"style":695},[4774],{"type":612,"value":4707},{"type":606,"tag":636,"props":4776,"children":4777},{"style":648},[4778],{"type":612,"value":4712},{"type":606,"tag":636,"props":4780,"children":4781},{"style":729},[4782],{"type":612,"value":4783},"\"Invalid total amount\"",{"type":606,"tag":636,"props":4785,"children":4786},{"style":648},[4787],{"type":612,"value":703},{"type":606,"tag":636,"props":4789,"children":4790},{"class":638,"line":190},[4791],{"type":606,"tag":636,"props":4792,"children":4793},{"style":648},[4794],{"type":612,"value":4668},{"type":606,"tag":636,"props":4796,"children":4797},{"class":638,"line":199},[4798,4803,4808],{"type":606,"tag":636,"props":4799,"children":4800},{"style":648},[4801],{"type":612,"value":4802},"            processed ",{"type":606,"tag":636,"props":4804,"children":4805},{"style":642},[4806],{"type":612,"value":4807},"+=",{"type":606,"tag":636,"props":4809,"children":4810},{"style":695},[4811],{"type":612,"value":4812}," 1\n",{"type":606,"tag":636,"props":4814,"children":4815},{"class":638,"line":208},[4816,4820,4824,4829,4833,4837,4841,4846],{"type":606,"tag":636,"props":4817,"children":4818},{"style":648},[4819],{"type":612,"value":1899},{"type":606,"tag":636,"props":4821,"children":4822},{"style":642},[4823],{"type":612,"value":1011},{"type":606,"tag":636,"props":4825,"children":4826},{"style":729},[4827],{"type":612,"value":4828},"\"Order ",{"type":606,"tag":636,"props":4830,"children":4831},{"style":695},[4832],{"type":612,"value":1021},{"type":606,"tag":636,"props":4834,"children":4835},{"style":648},[4836],{"type":612,"value":4631},{"type":606,"tag":636,"props":4838,"children":4839},{"style":695},[4840],{"type":612,"value":1031},{"type":606,"tag":636,"props":4842,"children":4843},{"style":729},[4844],{"type":612,"value":4845}," processed successfully\"",{"type":606,"tag":636,"props":4847,"children":4848},{"style":648},[4849],{"type":612,"value":703},{"type":606,"tag":636,"props":4851,"children":4852},{"class":638,"line":217},[4853],{"type":606,"tag":636,"props":4854,"children":4855},{"style":648},[4856],{"type":612,"value":4668},{"type":606,"tag":636,"props":4858,"children":4859},{"class":638,"line":227},[4860,4865,4869,4873],{"type":606,"tag":636,"props":4861,"children":4862},{"style":642},[4863],{"type":612,"value":4864},"        except",{"type":606,"tag":636,"props":4866,"children":4867},{"style":695},[4868],{"type":612,"value":4707},{"type":606,"tag":636,"props":4870,"children":4871},{"style":642},[4872],{"type":612,"value":2002},{"type":606,"tag":636,"props":4874,"children":4875},{"style":648},[4876],{"type":612,"value":2007},{"type":606,"tag":636,"props":4878,"children":4879},{"class":638,"line":236},[4880,4885,4889],{"type":606,"tag":636,"props":4881,"children":4882},{"style":648},[4883],{"type":612,"value":4884},"            errors ",{"type":606,"tag":636,"props":4886,"children":4887},{"style":642},[4888],{"type":612,"value":4807},{"type":606,"tag":636,"props":4890,"children":4891},{"style":695},[4892],{"type":612,"value":4812},{"type":606,"tag":636,"props":4894,"children":4895},{"class":638,"line":245},[4896,4900,4904,4908,4912,4916,4920,4925,4929,4934,4938,4942],{"type":606,"tag":636,"props":4897,"children":4898},{"style":648},[4899],{"type":612,"value":2928},{"type":606,"tag":636,"props":4901,"children":4902},{"style":642},[4903],{"type":612,"value":1011},{"type":606,"tag":636,"props":4905,"children":4906},{"style":729},[4907],{"type":612,"value":4828},{"type":606,"tag":636,"props":4909,"children":4910},{"style":695},[4911],{"type":612,"value":1021},{"type":606,"tag":636,"props":4913,"children":4914},{"style":648},[4915],{"type":612,"value":4631},{"type":606,"tag":636,"props":4917,"children":4918},{"style":695},[4919],{"type":612,"value":1031},{"type":606,"tag":636,"props":4921,"children":4922},{"style":729},[4923],{"type":612,"value":4924}," failed: ",{"type":606,"tag":636,"props":4926,"children":4927},{"style":695},[4928],{"type":612,"value":1021},{"type":606,"tag":636,"props":4930,"children":4931},{"style":648},[4932],{"type":612,"value":4933},"e",{"type":606,"tag":636,"props":4935,"children":4936},{"style":695},[4937],{"type":612,"value":1031},{"type":606,"tag":636,"props":4939,"children":4940},{"style":729},[4941],{"type":612,"value":1054},{"type":606,"tag":636,"props":4943,"children":4944},{"style":648},[4945],{"type":612,"value":703},{"type":606,"tag":636,"props":4947,"children":4948},{"class":638,"line":254},[4949,4953,4957,4961],{"type":606,"tag":636,"props":4950,"children":4951},{"style":642},[4952],{"type":612,"value":4864},{"type":606,"tag":636,"props":4954,"children":4955},{"style":695},[4956],{"type":612,"value":1997},{"type":606,"tag":636,"props":4958,"children":4959},{"style":642},[4960],{"type":612,"value":2002},{"type":606,"tag":636,"props":4962,"children":4963},{"style":648},[4964],{"type":612,"value":2007},{"type":606,"tag":636,"props":4966,"children":4967},{"class":638,"line":263},[4968,4972,4976],{"type":606,"tag":636,"props":4969,"children":4970},{"style":648},[4971],{"type":612,"value":4884},{"type":606,"tag":636,"props":4973,"children":4974},{"style":642},[4975],{"type":612,"value":4807},{"type":606,"tag":636,"props":4977,"children":4978},{"style":695},[4979],{"type":612,"value":4812},{"type":606,"tag":636,"props":4981,"children":4982},{"class":638,"line":272},[4983,4988,4992,4997,5001,5005,5009,5013],{"type":606,"tag":636,"props":4984,"children":4985},{"style":648},[4986],{"type":612,"value":4987},"            logging.exception(",{"type":606,"tag":636,"props":4989,"children":4990},{"style":642},[4991],{"type":612,"value":1011},{"type":606,"tag":636,"props":4993,"children":4994},{"style":729},[4995],{"type":612,"value":4996},"\"Unexpected error in order ",{"type":606,"tag":636,"props":4998,"children":4999},{"style":695},[5000],{"type":612,"value":1021},{"type":606,"tag":636,"props":5002,"children":5003},{"style":648},[5004],{"type":612,"value":4631},{"type":606,"tag":636,"props":5006,"children":5007},{"style":695},[5008],{"type":612,"value":1031},{"type":606,"tag":636,"props":5010,"children":5011},{"style":729},[5012],{"type":612,"value":1054},{"type":606,"tag":636,"props":5014,"children":5015},{"style":648},[5016],{"type":612,"value":703},{"type":606,"tag":636,"props":5018,"children":5019},{"class":638,"line":281},[5020],{"type":606,"tag":636,"props":5021,"children":5022},{"style":648},[5023],{"type":612,"value":1066},{"type":606,"tag":636,"props":5025,"children":5026},{"class":638,"line":291},[5027,5031,5035,5040,5044,5049,5053,5058,5062,5067,5071,5076],{"type":606,"tag":636,"props":5028,"children":5029},{"style":648},[5030],{"type":612,"value":1006},{"type":606,"tag":636,"props":5032,"children":5033},{"style":642},[5034],{"type":612,"value":1011},{"type":606,"tag":636,"props":5036,"children":5037},{"style":729},[5038],{"type":612,"value":5039},"\"Order processing complete: ",{"type":606,"tag":636,"props":5041,"children":5042},{"style":695},[5043],{"type":612,"value":1021},{"type":606,"tag":636,"props":5045,"children":5046},{"style":648},[5047],{"type":612,"value":5048},"processed",{"type":606,"tag":636,"props":5050,"children":5051},{"style":695},[5052],{"type":612,"value":1031},{"type":606,"tag":636,"props":5054,"children":5055},{"style":729},[5056],{"type":612,"value":5057}," successful, ",{"type":606,"tag":636,"props":5059,"children":5060},{"style":695},[5061],{"type":612,"value":1021},{"type":606,"tag":636,"props":5063,"children":5064},{"style":648},[5065],{"type":612,"value":5066},"errors",{"type":606,"tag":636,"props":5068,"children":5069},{"style":695},[5070],{"type":612,"value":1031},{"type":606,"tag":636,"props":5072,"children":5073},{"style":729},[5074],{"type":612,"value":5075}," errors\"",{"type":606,"tag":636,"props":5077,"children":5078},{"style":648},[5079],{"type":612,"value":703},{"type":606,"tag":636,"props":5081,"children":5082},{"class":638,"line":302},[5083],{"type":606,"tag":636,"props":5084,"children":5085},{"emptyLinePlaceholder":13},[5086],{"type":612,"value":659},{"type":606,"tag":636,"props":5088,"children":5089},{"class":638,"line":311},[5090],{"type":606,"tag":636,"props":5091,"children":5092},{"style":665},[5093],{"type":612,"value":5094},"# Test order processing\n",{"type":606,"tag":636,"props":5096,"children":5097},{"class":638,"line":320},[5098,5103,5107],{"type":606,"tag":636,"props":5099,"children":5100},{"style":648},[5101],{"type":612,"value":5102},"orders ",{"type":606,"tag":636,"props":5104,"children":5105},{"style":642},[5106],{"type":612,"value":687},{"type":606,"tag":636,"props":5108,"children":5109},{"style":648},[5110],{"type":612,"value":5111}," [\n",{"type":606,"tag":636,"props":5113,"children":5114},{"class":638,"line":329},[5115,5120,5125,5129,5133,5137,5141,5145,5150],{"type":606,"tag":636,"props":5116,"children":5117},{"style":648},[5118],{"type":612,"value":5119},"    {",{"type":606,"tag":636,"props":5121,"children":5122},{"style":729},[5123],{"type":612,"value":5124},"\"id\"",{"type":606,"tag":636,"props":5126,"children":5127},{"style":648},[5128],{"type":612,"value":1580},{"type":606,"tag":636,"props":5130,"children":5131},{"style":695},[5132],{"type":612,"value":4589},{"type":606,"tag":636,"props":5134,"children":5135},{"style":648},[5136],{"type":612,"value":1250},{"type":606,"tag":636,"props":5138,"children":5139},{"style":729},[5140],{"type":612,"value":4745},{"type":606,"tag":636,"props":5142,"children":5143},{"style":648},[5144],{"type":612,"value":1580},{"type":606,"tag":636,"props":5146,"children":5147},{"style":695},[5148],{"type":612,"value":5149},"25.99",{"type":606,"tag":636,"props":5151,"children":5152},{"style":648},[5153],{"type":612,"value":5154},"},\n",{"type":606,"tag":636,"props":5156,"children":5157},{"class":638,"line":338},[5158,5162,5166,5170,5174,5178,5182,5186,5191,5196,5201],{"type":606,"tag":636,"props":5159,"children":5160},{"style":648},[5161],{"type":612,"value":5119},{"type":606,"tag":636,"props":5163,"children":5164},{"style":729},[5165],{"type":612,"value":5124},{"type":606,"tag":636,"props":5167,"children":5168},{"style":648},[5169],{"type":612,"value":1580},{"type":606,"tag":636,"props":5171,"children":5172},{"style":695},[5173],{"type":612,"value":1255},{"type":606,"tag":636,"props":5175,"children":5176},{"style":648},[5177],{"type":612,"value":1250},{"type":606,"tag":636,"props":5179,"children":5180},{"style":729},[5181],{"type":612,"value":4745},{"type":606,"tag":636,"props":5183,"children":5184},{"style":648},[5185],{"type":612,"value":1580},{"type":606,"tag":636,"props":5187,"children":5188},{"style":642},[5189],{"type":612,"value":5190},"-",{"type":606,"tag":636,"props":5192,"children":5193},{"style":695},[5194],{"type":612,"value":5195},"5.00",{"type":606,"tag":636,"props":5197,"children":5198},{"style":648},[5199],{"type":612,"value":5200},"},  ",{"type":606,"tag":636,"props":5202,"children":5203},{"style":665},[5204],{"type":612,"value":5205},"# Invalid amount\n",{"type":606,"tag":636,"props":5207,"children":5208},{"class":638,"line":347},[5209,5213,5217,5221,5226,5230,5235,5239,5244,5249],{"type":606,"tag":636,"props":5210,"children":5211},{"style":648},[5212],{"type":612,"value":5119},{"type":606,"tag":636,"props":5214,"children":5215},{"style":729},[5216],{"type":612,"value":5124},{"type":606,"tag":636,"props":5218,"children":5219},{"style":648},[5220],{"type":612,"value":1580},{"type":606,"tag":636,"props":5222,"children":5223},{"style":695},[5224],{"type":612,"value":5225},"3",{"type":606,"tag":636,"props":5227,"children":5228},{"style":648},[5229],{"type":612,"value":1250},{"type":606,"tag":636,"props":5231,"children":5232},{"style":729},[5233],{"type":612,"value":5234},"\"product\"",{"type":606,"tag":636,"props":5236,"children":5237},{"style":648},[5238],{"type":612,"value":1580},{"type":606,"tag":636,"props":5240,"children":5241},{"style":729},[5242],{"type":612,"value":5243},"\"item\"",{"type":606,"tag":636,"props":5245,"children":5246},{"style":648},[5247],{"type":612,"value":5248},"}  ",{"type":606,"tag":636,"props":5250,"children":5251},{"style":665},[5252],{"type":612,"value":5253},"# Missing total\n",{"type":606,"tag":636,"props":5255,"children":5256},{"class":638,"line":356},[5257],{"type":606,"tag":636,"props":5258,"children":5259},{"style":648},[5260],{"type":612,"value":4144},{"type":606,"tag":636,"props":5262,"children":5263},{"class":638,"line":367},[5264],{"type":606,"tag":636,"props":5265,"children":5266},{"emptyLinePlaceholder":13},[5267],{"type":612,"value":659},{"type":606,"tag":636,"props":5269,"children":5270},{"class":638,"line":376},[5271],{"type":606,"tag":636,"props":5272,"children":5273},{"style":648},[5274],{"type":612,"value":5275},"process_orders(orders)\n",{"type":606,"tag":807,"props":5277,"children":5279},{"id":5278},"key-takeaways",[5280],{"type":612,"value":5281},"🎯 Key Takeaways",{"type":606,"tag":819,"props":5283,"children":5287},{"emoji":5284,"title":5285,"type":5286},"📚","Logging Essentials","success",[5288,5296,5319,5327,5350,5358,5387,5395,5418],{"type":606,"tag":615,"props":5289,"children":5290},{},[5291],{"type":606,"tag":829,"props":5292,"children":5293},{},[5294],{"type":612,"value":5295},"Log Levels:",{"type":606,"tag":835,"props":5297,"children":5298},{},[5299,5304,5309,5314],{"type":606,"tag":839,"props":5300,"children":5301},{},[5302],{"type":612,"value":5303},"Use appropriate levels for different situations",{"type":606,"tag":839,"props":5305,"children":5306},{},[5307],{"type":612,"value":5308},"DEBUG for detailed diagnostic info",{"type":606,"tag":839,"props":5310,"children":5311},{},[5312],{"type":612,"value":5313},"INFO for general application flow",{"type":606,"tag":839,"props":5315,"children":5316},{},[5317],{"type":612,"value":5318},"WARNING/ERROR/CRITICAL for problems",{"type":606,"tag":615,"props":5320,"children":5321},{},[5322],{"type":606,"tag":829,"props":5323,"children":5324},{},[5325],{"type":612,"value":5326},"Configuration:",{"type":606,"tag":835,"props":5328,"children":5329},{},[5330,5335,5340,5345],{"type":606,"tag":839,"props":5331,"children":5332},{},[5333],{"type":612,"value":5334},"Set up logging at application start",{"type":606,"tag":839,"props":5336,"children":5337},{},[5338],{"type":612,"value":5339},"Use consistent format across application",{"type":606,"tag":839,"props":5341,"children":5342},{},[5343],{"type":612,"value":5344},"Log to files for production applications",{"type":606,"tag":839,"props":5346,"children":5347},{},[5348],{"type":612,"value":5349},"Include timestamps and log levels",{"type":606,"tag":615,"props":5351,"children":5352},{},[5353],{"type":606,"tag":829,"props":5354,"children":5355},{},[5356],{"type":612,"value":5357},"Best Practices:",{"type":606,"tag":835,"props":5359,"children":5360},{},[5361,5366,5371,5382],{"type":606,"tag":839,"props":5362,"children":5363},{},[5364],{"type":612,"value":5365},"Use logging instead of print statements",{"type":606,"tag":839,"props":5367,"children":5368},{},[5369],{"type":612,"value":5370},"Include relevant context in messages",{"type":606,"tag":839,"props":5372,"children":5373},{},[5374,5376],{"type":612,"value":5375},"Log exceptions with ",{"type":606,"tag":632,"props":5377,"children":5379},{"className":5378},[],[5380],{"type":612,"value":5381},"logging.exception()",{"type":606,"tag":839,"props":5383,"children":5384},{},[5385],{"type":612,"value":5386},"Don't log sensitive information",{"type":606,"tag":615,"props":5388,"children":5389},{},[5390],{"type":606,"tag":829,"props":5391,"children":5392},{},[5393],{"type":612,"value":5394},"Common Patterns:",{"type":606,"tag":835,"props":5396,"children":5397},{},[5398,5403,5408,5413],{"type":606,"tag":839,"props":5399,"children":5400},{},[5401],{"type":612,"value":5402},"Application startup/shutdown logging",{"type":606,"tag":839,"props":5404,"children":5405},{},[5406],{"type":612,"value":5407},"Error and exception tracking",{"type":606,"tag":839,"props":5409,"children":5410},{},[5411],{"type":612,"value":5412},"User action logging",{"type":606,"tag":839,"props":5414,"children":5415},{},[5416],{"type":612,"value":5417},"Performance monitoring",{"type":606,"tag":615,"props":5419,"children":5420},{},[5421,5426],{"type":606,"tag":829,"props":5422,"children":5423},{},[5424],{"type":612,"value":5425},"Remember:",{"type":612,"value":5427}," Good logging makes debugging and monitoring much easier!",{"type":606,"tag":807,"props":5429,"children":5431},{"id":5430},"whats-next",[5432],{"type":612,"value":5433},"🚀 What's Next?",{"type":606,"tag":615,"props":5435,"children":5436},{},[5437],{"type":612,"value":5438},"Learn how to implement retry logic to make your applications more resilient to temporary failures.",{"type":606,"tag":615,"props":5440,"children":5441},{},[5442,5447,5448],{"type":606,"tag":829,"props":5443,"children":5444},{},[5445],{"type":612,"value":5446},"Continue to",{"type":612,"value":1580},{"type":606,"tag":1026,"props":5449,"children":5450},{"href":399},[5451],{"type":612,"value":400},{"type":606,"tag":5453,"props":5454,"children":5455},"style",{},[5456],{"type":612,"value":5457},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .app-dark-mode .shiki span {color: var(--shiki-app-dark-mode);background: var(--shiki-app-dark-mode-bg);font-style: var(--shiki-app-dark-mode-font-style);font-weight: var(--shiki-app-dark-mode-font-weight);text-decoration: var(--shiki-app-dark-mode-text-decoration);}html.app-dark-mode .shiki span {color: var(--shiki-app-dark-mode);background: var(--shiki-app-dark-mode-bg);font-style: var(--shiki-app-dark-mode-font-style);font-weight: var(--shiki-app-dark-mode-font-weight);text-decoration: var(--shiki-app-dark-mode-text-decoration);}",{"title":8,"searchDepth":36,"depth":36,"links":5459},[5460,5465,5466,5471,5475,5479,5480],{"id":809,"depth":27,"text":812,"children":5461},[5462,5463,5464],{"id":906,"depth":36,"text":909},{"id":1295,"depth":36,"text":1298},{"id":1696,"depth":36,"text":1699},{"id":2109,"depth":27,"text":2112},{"id":2252,"depth":27,"text":2255,"children":5467},[5468,5469,5470],{"id":2258,"depth":36,"text":2261},{"id":2615,"depth":36,"text":2618},{"id":3084,"depth":36,"text":3087},{"id":3589,"depth":27,"text":3592,"children":5472},[5473,5474],{"id":3595,"depth":36,"text":3598},{"id":3740,"depth":36,"text":3743},{"id":3923,"depth":27,"text":3926,"children":5476},[5477,5478],{"id":3929,"depth":36,"text":3932},{"id":4390,"depth":36,"text":4393},{"id":5278,"depth":27,"text":5281},{"id":5430,"depth":27,"text":5433},1782373760083]