I have changed then function calleurname and now returns line numbers for calls. I think it is very useful and should figure in the next release. the code is this:

FUNCTION calleurname return varchar2
IS
   endOfLine   constant    char(1) := chr(10);
   endOfField  constant    char(1) := chr(32);
   nbrLine     number;
   ptFinLigne  number;
   ptDebLigne  number;
   ptDebCode   number;
   pt1         number;
   cpt         number;
   allLines    varchar2(4000);
   resultat    varchar2(4000);
   Line        varchar2(4000);
   LineNumber  varchar2(10);
   ptDebCode2   number;
   UserCode    varchar2(4000);
   myName      varchar2(2000) := '.PLOG';
begin
   allLines    := dbms_utility.format_call_stack;
   cpt         := 2;
   ptFinLigne  := length(allLines);
   ptDebLigne  := ptFinLigne;

   While ptFinLigne > 0 and ptDebLigne > 83 loop
      ptDebLigne   := INSTR (allLines, endOfLine, -1, cpt) + 1 ;
      cpt          := cpt + 1;
      -- traite ligne
Line := SUBSTR(allLines, ptDebLigne, ptFinLigne - ptDebLigne);
      ptDebCode    := INSTR (Line, endOfField, -1, 1);
      UserCode     := SUBSTR(Line, ptDebCode+1);
      ptDebCode2    := INSTR (Line, endOfField, -1, 4);
      ptDebCode    := INSTR (Line, endOfField, -1, 5);
      LineNumber   := SUBSTR(Line, ptDebCode+1,ptDebCode2 - ptDebCode-1);

      IF instr(UserCode,myName) = 0 then
          IF cpt > 3 then
            resultat := resultat||'.';
          end IF;
resultat := resultat||UserCode||(CASE WHEN LineNumber IS NULL THEN '' ELSE '('||LineNumber||')' END);
      end if;
      ptFinLigne := ptDebLigne - 1;
    end loop;

return resultat;
end calleurname;

thanks.



-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Log4plsql-all-info mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/log4plsql-all-info
log4plsq : http://log4plsql.sourceforge.net

Reply via email to