INNER CODE UNIT · Python

start

lebinh/ngxtop · ngxtop/ngxtop.py:390

                        start = max(0, e.pos - 20)
                        end = min(len(json_str), e.pos + 20)
                        logging.info(f"JSON around error position: ...{json_str[start:end]}...")
                        logging.info(f"                            {' ' * (e.pos - start - 3)}^")
                    
                    # Output the complete line for analysis
                    logging.info(f"Complete line from beginning ({len(line)} chars):")
                    # Show first 100 chars to see the prefix, then ... then area around JSON start
                    if len(line) > 200:
                        prefix = line[:100]
                        json_area = line[max(0, json_start-20):json_start+80]
                        logging.info(f"{prefix}...{json_area}...")
                    else:
                        logging.info(line.rstrip())
                    
                    # Output the extracted JSON string
                    logging.info(f"Extracted JSON string ({len(json_str)} chars):")
                    logging.info(json_str)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…