首页 > 数据库技术 > 详细

Oracle中pls_logger记录日志信息

时间:2014-06-07 22:09:42      阅读:581      评论:0      收藏:0      [点我收藏+]
bubuko.com,布布扣
/*
 参数说明:
 pi_program_name    程序名称
 pi_directory        写入日志文件所在的目录
 pi_file            日志文件名称,必须存在
 pi_log_level        日记级别,INFO、WARN、FATAL
 pi_write_to        写到哪里,SCREEN、FILE、TABLE、ALL
 pi_error_message   写入到日志的错误信息
 
  pi_status            输出参数 1失败 0成功
*/
BEGIN
    pls_logger  ( pi_program_name   => SCREEN_PROGRAM_ERROR
                , pi_log_level      => INFO
                , pi_write_to       => SCREEN
                , pi_error_message  => This execution writes to SCREEN.
                );

    pls_logger  ( pi_program_name   => WARN_PROGRAM_ERROR
                , pi_log_level      => WARN
                , pi_write_to       => TABLE
                , pi_error_message  => This execution writes to TABLE.
                );
                
    pls_logger  ( pi_program_name     => FATAL_PROGRAM_ERROR
                , pi_log_level        => FATAL
                , pi_write_to         => FILE
                , pi_error_message    => This execution writes to FILE.
                , pi_file             => my_logfile.txt
                );
                
    pls_logger  ( pi_program_name   => FATAL_PROGRAM_ERROR
                , pi_log_level      => FATAL
                , pi_write_to       => ALL
                , pi_error_message  => This execution writes to ALL.
                , pi_file           => my_logfile.txt
                );
END;
/
bubuko.com,布布扣

 

Oracle中pls_logger记录日志信息,布布扣,bubuko.com

Oracle中pls_logger记录日志信息

原文:http://www.cnblogs.com/nuaa/p/3774854.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!