Hi,
Thank you very much for your update.
Could you send me a output exemple for the documentation?
I can introduse this update in next release.
G.
On Wed, Jun 23, 2010 at 03:27, wrote:
>
> Message body follows:
>
> Hello,
> I have found that the getCallStack function produces poor
> results when plog is called from a package. I suggest the
> line number be included in the getCallStack output. I have
> included the following code as an example:
>
> FUNCTION getCallStack RETURN VARCHAR2 IS
> endOfLine CONSTANT CHAR(1) := chr(10);
> endOfField CONSTANT CHAR(1) := chr(32);
> myName CONSTANT VARCHAR2(2000) := '.PLOG';
> allLines VARCHAR2(4000);
> v_result VARCHAR2(4000);
> Line VARCHAR2(4000);
> UserCode VARCHAR2(4000);
> lineNumber VARCHAR2(20);
> arrow varchar2(2);
> startPtr number;
> endPtr number;
> BEGIN
> allLines := dbms_utility.format_call_stack;
> startPtr := 83;
> LOOP
> endPtr := INSTR(allLines, endOfLine, startPtr);
> exit when endPtr = 0;
>
> Line := SUBSTR(allLines, startPtr, endPtr - startPtr);
> UserCode := SUBSTR(Line, INSTR (Line, endOfField, -1)
> + 1);
>
> if INSTR(UserCode, myName) = 0 THEN
> startPtr := instr(Line, endOfField);
> lineNumber := LTRIM(substr(line, startPtr,
> instr(line, endOfField, startPtr+1, 1)));
> v_result := UserCode || ':' || lineNumber ||
> arrow || v_result;
> arrow := '->';
> END IF;
>
> startPtr := endPtr + 1;
> END LOOP;
> RETURN v_result;
> END getCallStack;
>
> I will be using this updated version in my environment.
> Please let me know if you think this update would be
> beneficial to you.
>
> John Finlay
>
>
> --
> This message has been sent to you, a registered SourceForge.net user,
> by another site user, through the SourceForge.net site. This message
> has been delivered to your SourceForge.net mail alias. You may reply
> to this message using the "Reply" feature of your email client, or
> using the messaging facility of SourceForge.net at:
> https://sourceforge.net/sendmessage.php?touser=2964138
>
>
|