{
    "content": [
        {
            "type": "text",
            "text": "# Net::XMPP::Debug (perldoc)\n\n## NAME\n\nNet::XMPP::Debug - XMPP Debug Module\n\n## SYNOPSIS\n\nNet::XMPP::Debug is a module that provides a developer easy access to logging debug information.\n\n## DESCRIPTION\n\nDebug is a helper module for the Net::XMPP modules. It provides the Net::XMPP modules with an\nobject to control where, how, and what is logged.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION** (1 subsections)\n- **METHODS** (1 subsections)\n- **EXAMPLE**\n- **AUTHOR**\n- **COPYRIGHT**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Net::XMPP::Debug",
        "section": "",
        "mode": "perldoc",
        "summary": "Net::XMPP::Debug - XMPP Debug Module",
        "synopsis": "Net::XMPP::Debug is a module that provides a developer easy access to logging debug information.",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [
            "$Debug = Net::XMPP:Debug->new(level=>2,",
            "header=>\"Example\");",
            "$Debug->Log0(\"test\");",
            "$Debug->Log2(\"level 2 test\");",
            "$hash{a} = \"atest\";",
            "$hash{b} = \"btest\";",
            "$Debug->Log1(\"hashtest\", \\%hash);",
            "You would get the following log:",
            "Example: test",
            "Example: level 2 test",
            "Example: hashtest { a=>\"atest\" b=>\"btest\" }",
            "If you had set the level to 1 instead of 2 you would get:",
            "Example: test",
            "Example: hashtest { a=>\"atest\" b=>\"btest\" }"
        ],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 3,
                "subsections": [
                    {
                        "name": "Basic Functions",
                        "lines": 9
                    }
                ]
            },
            {
                "name": "METHODS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "Basic Functions",
                        "lines": 45
                    }
                ]
            },
            {
                "name": "EXAMPLE",
                "lines": 23,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 2,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "Net::XMPP::Debug - XMPP Debug Module\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "Net::XMPP::Debug is a module that provides a developer easy access to logging debug information.\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Debug is a helper module for the Net::XMPP modules. It provides the Net::XMPP modules with an\nobject to control where, how, and what is logged.\n",
                "subsections": [
                    {
                        "name": "Basic Functions",
                        "content": "$Debug = Net::XMPP::Debug->new();\n\n$Debug->Init(\nlevel  => 2,\nfile   => \"stdout\",\nheader =>\"MyScript\");\n\n$Debug->Log0(\"Connection established\");\n"
                    }
                ]
            },
            "METHODS": {
                "content": "",
                "subsections": [
                    {
                        "name": "Basic Functions",
                        "content": "new\nnew(hash)\n\ncreates the Debug object. The hash argument is passed to the Init function. See that\nfunction description below for the valid settings.\n\nInit\nInit(\nlevel      => integer,\nfile       => string,\nheader     => string,\nsetdefault => 0|1,\nusedefault => 0|1,\ntime       => 0|1)\n\ninitializes the debug object.\n\nThe level determines the maximum level of debug messages to log:\n\n0 - Base level Output (default)\n1 - High level API calls\n2 - Low level API calls\n...\nN - Whatever you want....\n\nThe file determines where the debug log goes. You can either specify a path to a file, or\n\"stdout\" (the default). \"stdout\" tells Debug to send all of the debug info sent to this\nobject to go to stdout.\n\nheader is a string that will preappended to the beginning of all log entries. This makes it\neasier to see what generated the log entry (default is \"Debug\").\n\nsetdefault saves the current filehandle and makes it available for other Debug objects to\nuse. To use the default set usedefault to 1.\n\nThe time parameter specifies whether or not to add a timestamp to the beginning of each\nlogged line.\n\nLogN\nLogN(array)\n\nLogs the elements of the array at the corresponding debug level N. If you pass in a\nreference to an array or hash then they are printed in a readable way. (ie... Log0, Log2,\nLog100, etc...)\n"
                    }
                ]
            },
            "EXAMPLE": {
                "content": "$Debug = Net::XMPP:Debug->new(level=>2,\nheader=>\"Example\");\n\n$Debug->Log0(\"test\");\n\n$Debug->Log2(\"level 2 test\");\n\n$hash{a} = \"atest\";\n$hash{b} = \"btest\";\n\n$Debug->Log1(\"hashtest\", \\%hash);\n\nYou would get the following log:\n\nExample: test\nExample: level 2 test\nExample: hashtest { a=>\"atest\" b=>\"btest\" }\n\nIf you had set the level to 1 instead of 2 you would get:\n\nExample: test\nExample: hashtest { a=>\"atest\" b=>\"btest\" }\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Originally authored by Ryan Eatmon.\n\nPreviously maintained by Eric Hacker.\n\nCurrently maintained by Darian Anthony Patrick.\n",
                "subsections": []
            },
            "COPYRIGHT": {
                "content": "This module is free software, you can redistribute it and/or modify it under the LGPL 2.1.\n",
                "subsections": []
            }
        }
    }
}