MINI MINI MANI MO

Path : /opt/oracle/product/18c/dbhomeXE/md/admin/
File Upload :
Current File : //opt/oracle/product/18c/dbhomeXE/md/admin/sdosemlogh.sql

Rem
Rem $Header: sdo/admin/sdosemlogh.sql /main/5 2017/03/30 08:19:32 alwu Exp $
Rem
Rem sdosemlogh.sql
Rem
Rem Copyright (c) 2006, 2017, Oracle and/or its affiliates. 
Rem All rights reserved.
Rem
Rem    NAME
Rem      sdosemlogh.sql - <one-line expansion of the name>
Rem
Rem    DESCRIPTION
Rem      <short description of component this file declares/defines>
Rem
Rem    NOTES
Rem      <other useful comments, qualifications, etc.>
Rem
Rem    BEGIN SQL_FILE_METADATA
Rem    SQL_SOURCE_FILE: sdo/admin/sdosemlogh.sql
Rem    SQL_SHIPPED_FILE: md/admin/sdosemlogh.sql
Rem    SQL_PHASE: SDOSEMLOGH
Rem    SQL_STARTUP_MODE: NORMAL
Rem    SQL_IGNORABLE_ERRORS: NONE
Rem    SQL_CALLING_FILE: sdo/admin/semrelod.sql
Rem    END SQL_FILE_METADATA
Rem
Rem    MODIFIED   (MM/DD/YY)
Rem    alwu        03/23/17 - XbranchMerge alwu_bug-24319503 from
Rem                           st_sdo_12.2.0.1.0
Rem    rjanders    03/09/17 - Add missing SQL_FILE_METADATA information
Rem    alwu        07/28/16 - fix bug 24319503
Rem    rjanders    03/15/13 - #16473696: Start/End _ORACLE_SCRIPT
Rem                           initialization
Rem    alwu        04/27/06 - add debug_nh: no header 
Rem    alwu        04/21/06 - add NEWLINE constant 
Rem    alwu        04/14/06 - start
Rem    alwu        04/14/06 - start
Rem    alwu        04/14/06 - Created
Rem

Rem ********************************************************************
Rem #16473696: Indicate Oracle-Supplied object
@@?/rdbms/admin/sqlsessstart.sql
Rem ********************************************************************

create or replace package sdo_sem_log as

  NEWLINE      constant char(1) := chr(10);

  DEFAULT_LOG_LEVEL constant integer := 0;

  --
  -- By default, log goes to trace files
  --
  procedure set_log_output(vcDest varchar2);
  procedure set_log_level(i integer);
  function  get_log_level return integer;

  function is_fatal_enabled     return boolean;
  function is_error_enabled     return boolean;
  function is_warning_enabled   return boolean;
  function is_assertion_enabled return boolean;
  function is_info_enabled      return boolean;
  function is_debug_enabled     return boolean;

  function get_caller_info return varchar2;


  /** 
   * The following two methods (fatal, error) will un-ambiguously record 
   * the error message, plus line number for this method call,
   * plus exception location if applicable,
   * plus call stack trace.
   * e.g.
   *
   * Case 1: there is no exception. Just an unexpected error condition.
   *    if (...) then
   *      sdo_sem_log.error('test3: should never be true');
   *    end if;
   *  ==> 
   *    "110015, MDSYS" @time: 0  [error] test3: should never be true
   *    Line# 349 in package body MDSYS.SDO_SEM_LOG
   *    Line# 358 in package body MDSYS.SDO_SEM_LOG
   *    Line# 367 in package body MDSYS.SDO_SEM_LOG
   *    Line# 1 in anonymous block
   *
   * Case 2: there is exception caught in the exception block
   *    begin
   *      ...
   *    exception
   *      when others then
   *        sdo_sem_log.error('test1: Caught exception');
   *        raise;
   *    end;
   *  ==> 
   *
   *    "110015, MDSYS" @time: 0  [error] test1: Caught exception
   *    ORA-20000: test2 error happened
   *    ORA-06512: at "MDSYS.SDO_SEM_LOG", line 342
   *    ORA-06512: at "MDSYS.SDO_SEM_LOG", line 352
   *    ORA-06512: at "MDSYS.SDO_SEM_LOG", line 358
   *    Line# 361 in package body MDSYS.SDO_SEM_LOG
   *    Line# 367 in package body MDSYS.SDO_SEM_LOG
   *    Line# 1 in anonymous block
   */
  procedure fatal(vcMsg varchar2);
  procedure error(vcMsg varchar2);

  procedure warning(vcMsg varchar2) ;
  procedure info   (vcMsg varchar2) ;

  procedure debug   (vcMsg varchar2) ;
  procedure debug_nh(vcMsg varchar2) ;

  procedure assert(b boolean, vcMsg varchar2);

  /** Testing (Unit Testing) Code Starts Next. TODO: to be removed before
      production **/
  procedure test;
end;
/


show errors;



Rem ********************************************************************
Rem #16473696: Indicate Oracle-Supplied object
@?/rdbms/admin/sqlsessend.sql
Rem ********************************************************************


OHA YOOOO