码迷,mamicode.com
首页 > 数据库 > 详细

Oracle中pls_logger记录日志信息

时间:2014-06-07 22:09:19      阅读:368      评论:0      收藏:0      [点我收藏+]

标签:c   style   class   blog   code   java   

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记录日志信息

标签:c   style   class   blog   code   java   

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

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!