{
    "content": [
        {
            "type": "text",
            "text": "# Net::Jabber::Log (perldoc)\n\n## NAME\n\nNet::Jabber::Log - Jabber Log Module\n\n## SYNOPSIS\n\nNet::Jabber::Log is a companion to the Net::Jabber module.\nIt provides the user a simple interface to set and retrieve all\nparts of a Jabber Log.\n\n## DESCRIPTION\n\nTo initialize the Log with a Jabber <log/> you must pass it the\nXML::Parser Tree array.  For example:\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION** (3 subsections)\n- **METHODS** (3 subsections)\n- **AUTHOR**\n- **COPYRIGHT**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "Net::Jabber::Log",
        "section": "",
        "mode": "perldoc",
        "summary": "Net::Jabber::Log - Jabber Log Module",
        "synopsis": "Net::Jabber::Log is a companion to the Net::Jabber module.\nIt provides the user a simple interface to set and retrieve all\nparts of a Jabber Log.",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 32,
                "subsections": [
                    {
                        "name": "Retrieval functions",
                        "lines": 8
                    },
                    {
                        "name": "Creation functions",
                        "lines": 7
                    },
                    {
                        "name": "Test functions",
                        "lines": 3
                    }
                ]
            },
            {
                "name": "METHODS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "Retrieval functions",
                        "lines": 17
                    },
                    {
                        "name": "Creation functions",
                        "lines": 25
                    },
                    {
                        "name": "Test functions",
                        "lines": 6
                    }
                ]
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 3,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "Net::Jabber::Log - Jabber Log Module\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "Net::Jabber::Log is a companion to the Net::Jabber module.\nIt provides the user a simple interface to set and retrieve all\nparts of a Jabber Log.\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "To initialize the Log with a Jabber <log/> you must pass it the\nXML::Parser Tree array.  For example:\n\nmy $log = new Net::Jabber::Log(@tree);\n\nThere has been a change from the old way of handling the callbacks.\nYou no longer have to do the above, a Net::Jabber::Log object is passed\nto the callback function for the log:\n\nuse Net::Jabber;\n\nsub log {\nmy ($Log) = @;\n.\n.\n.\n}\n\nYou now have access to all of the retrieval functions available.\n\nTo create a new log to send to the server:\n\nuse Net::Jabber;\n\n$Log = new Net::Jabber::Log();\n\nNow you can call the creation functions below to populate the tag before\nsending it.\n\nFor more information about the array format being passed to the CallBack\nplease read the Net::Jabber::Client documentation.\n",
                "subsections": [
                    {
                        "name": "Retrieval functions",
                        "content": "$from       = $Log->GetFrom();\n$fromJID    = $Log->GetFrom(\"jid\");\n$type       = $Log->GetType();\n$data       = $Log->GetData();\n\n$str        = $Log->GetXML();\n@log        = $Log->GetTree();\n"
                    },
                    {
                        "name": "Creation functions",
                        "content": "$Log->SetLog(type=>\"error\",\nfrom=>\"users.jabber.org\",\ndata=>\"The moon is full... I can't run anymore.\");\n$Log->SetFrom(\"foo.jabber.org\");\n$Log->SetType(\"warn\");\n$Log->SetData(\"I can't find a config file.  Using defaults.\");\n"
                    },
                    {
                        "name": "Test functions",
                        "content": "$test = $Log->DefinedFrom();\n$test = $Log->DefinedType();\n"
                    }
                ]
            },
            "METHODS": {
                "content": "",
                "subsections": [
                    {
                        "name": "Retrieval functions",
                        "content": "GetFrom()      -  returns either a string with the Jabber Identifier,\nGetFrom(\"jid\")    or a Net::Jabber::JID object for the person who\nsent the <log/>.  To get the JID object set\nthe string to \"jid\", otherwise leave blank for the\ntext string.\n\nGetType() - returns a string with the type <log/> this is.\n\nGetData() - returns a string with the cdata of the <log/>.\n\nGetXML() - returns the XML string that represents the <log/>.\nThis is used by the Send() function in Client.pm to send\nthis object as a Jabber Log.\n\nGetTree() - returns an array that contains the <log/> tag\nin XML::Parser Tree format.\n"
                    },
                    {
                        "name": "Creation functions",
                        "content": "SetLog(from=>string|JID, - set multiple fields in the <log/>\ntype=>string,       at one time.  This is a cumulative\ndata=>string)       and over writing action.  If you set\nthe \"from\" attribute twice, the second\nsetting is what is used.  If you set\nthe type, and then set the data\nthen both will be in the <log/>\ntag.  For valid settings read the\nspecific Set functions below.\n\nSetFrom(string) - sets the from attribute.  You can either pass a string\nSetFrom(JID)      or a JID object.  They must be valid Jabber\nIdentifiers or the server will return an error log.\n(ie.  jabber:bob@jabber.org/Silent Bob, etc...)\n\nSetType(string) - sets the type attribute.  Valid settings are:\n\nnotice     general logging\nwarn       warning\nalert      critical error (can still run but not\ncorrectly)\nerror      fatal error (cannot run anymore)\n\nSetData(string) - sets the cdata of the <log/>.\n"
                    },
                    {
                        "name": "Test functions",
                        "content": "DefinedFrom() - returns 1 if the from attribute is defined in the\n<log/>, 0 otherwise.\n\nDefinedType() - returns 1 if the type attribute is defined in the\n<log/>, 0 otherwise.\n"
                    }
                ]
            },
            "AUTHOR": {
                "content": "By Ryan Eatmon in May of 2000 for http://jabber.org..\n",
                "subsections": []
            },
            "COPYRIGHT": {
                "content": "This module is free software; you can redistribute it and/or modify it under the same terms as\nPerl itself.\n",
                "subsections": []
            }
        }
    }
}