Develop and Download Open Source Software

Browse CVS Repository

Diff of /xoonips/AL/commonal.cc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.109 by aga4096, Fri Sep 9 01:29:27 2005 UTC revision 1.110 by aga4096, Fri Sep 9 06:26:35 2005 UTC
# Line 22  Line 22 
22   *   *
23   * $Revision$   * $Revision$
24   * $Log$   * $Log$
25     * Revision 1.110  2005/09/09 06:26:35  aga4096
26     * ・xnp_use_syslog()を作成.
27     *
28   * Revision 1.109  2005/09/09 01:29:27  aga4096   * Revision 1.109  2005/09/09 01:29:27  aga4096
29   * ・refresh_item_status, update_item_statusがエラーになることがあるのを修正.   * ・refresh_item_status, update_item_statusがエラーになることがあるのを修正.
30   *   *
# Line 479  using namespace std; Line 482  using namespace std;
482    
483  static string dbprefix; //!< XOOPSデータベーステーブルのPREFIX  static string dbprefix; //!< XOOPSデータベーステーブルのPREFIX
484  static dbtype_t dbtype; //!< MySQL/SQLite  static dbtype_t dbtype; //!< MySQL/SQLite
485    static bool useSyslogFlag = false;
486    
487  static SQLHANDLE henv = NULL;  static SQLHANDLE henv = NULL;
488  static SQLHANDLE hdbc = NULL;  static SQLHANDLE hdbc = NULL;
# Line 502  static result_t insertMetadataEventAuto( Line 506  static result_t insertMetadataEventAuto(
506  static void syslog_printf( char* format, ... )  static void syslog_printf( char* format, ... )
507  {  {
508  #ifdef USE_SYSLOG  #ifdef USE_SYSLOG
509      va_list ap;      if ( useSyslogFlag ){
510      va_start(ap, format);          va_list ap;
511      openlog( "commonal", LOG_ODELAY, LOG_USER );          va_start(ap, format);
512      vsyslog( LOG_DEBUG, format, ap );          openlog( "commonal", LOG_ODELAY, LOG_USER );
513            vsyslog( LOG_DEBUG, format, ap );
514        }
515  #endif  #endif
516  }  }
517    
518    void useSyslog( bool f )
519    {
520        useSyslogFlag = f;
521    }
522    
523  /**  ',' . implode( ',', pi ) の形の文字列を作成する。先頭にcommaがあるので注意  /**  ',' . implode( ',', pi ) の形の文字列を作成する。先頭にcommaがあるので注意
524   * @param pi   int配列   * @param pi   int配列
525   * @param len  配列の長さ   * @param len  配列の長さ

Legend:
Removed from v.1.109  
changed lines
  Added in v.1.110

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26