ºìÁªLinuxÃÅ»§
Linux°ïÖú

³ÌÐòÉú³ÉµÄÈÕÖ¾ÎÊÌâ

·¢²¼Ê±¼ä:2009-03-02 11:44:07À´Ô´:ºìÁª×÷Õß:xgyz1820
Çë´ó¼Ò½ÌÒ»¸öÎÊÌ⣺
¾ÍÊÇÎÒ×Ô¼ºµÄ³ÌÐòÉú³ÉµÄ´íÎóÈÕÖ¾£¬ÎÒµ÷ÓÃÁËÏÂÃæµÄº¯Êý
int mylog_init(char* prefix);
int mylog_setdir(char* logdir);
int mylog_write(char* logmsg);
int mylog_close();
°Ñ´íÎóÐÅÏ¢Êä³öµ½Ö¸¶¨µÄĿ¼¡£

ÎÒÏëÎÊÎÊ£ºÄܲ»Äܵ÷ÓÃϵͳµÄº¯Êý£¬²»¸Ä¶¯syslog.confµÄÅäÖÃÎļþ£¬ÔÚ³ÌÐòÖÐÉ趨ÈÕÖ¾Éú³ÉµÄ·¾¶ÄØ£¿
ÏÈлл´ó¼ÒÁË£¡£¡!
ÎÄÕÂÆÀÂÛ

¹²ÓÐ 8 ÌõÆÀÂÛ

  1. michrykitty ÓÚ 2009-03-09 15:28:38·¢±í:

    ѧϰÁË:0wmjh(1

  2. wang7131984 ÓÚ 2009-03-02 13:44:38·¢±í:

    ÄãµÄÕâ¸öÎÊÌâºÜºÃ¡«£¬²»ÓÃ×Ô¼º¶¨Ò庯Êý£¬¿ÉÒÔÓú궨ÒåÀ´Çø·ÖÒ»°ãµÄÊä³öºÍÈÕÖ¾Êä³ö,ÕâÑùÒ²»áÔö¼Ó³ÌÐòµÄÁé»îÐÔ

  3. xgyz1820 ÓÚ 2009-03-02 13:36:37·¢±í:

    ллÁË£¡

  4. wang7131984 ÓÚ 2009-03-02 13:31:03·¢±í:

    fprintf(FILE *, format, logmessage);

  5. xgyz1820 ÓÚ 2009-03-02 12:52:14·¢±í:

    ÕâÈý¸öµ÷ÓÃÊÇ°ÑÈÕÖ¾Êä³öµ½ /etc/syslog.conf ÅäÖÃÎļþÖÐÉ趨µÄ¶ÔӦ·¾¶µÄÎļþÀïÍ·¡£¿ÉÒԸıäÕâÀïµÄÉèÖã¬ÊµÏְѲ»Í¬µÄÈÕÖ¾Êä³öµ½²»Í¬ÎļþÀïÍ·¡£
    ÏÖÔÚµÄÇé¿öÊÇ£º
    ²»¸Ä±ä/etc/syslog.conf ÅäÖÃÎļþ£¬À´ÊµÏÖ°ÑÈÕÖ¾Êä³öµ½ÎÒÖ¸¶¨µÄÎļþÀïÍ·¡£
    ·Ç³£¸ÐлÄãµÄ°ïÖú£¡£¡£¡£¡

  6. wang7131984 ÓÚ 2009-03-02 12:32:01·¢±í:

    ÉÏÃæÈý¸öϵͳµ÷ÓÃ

  7. xgyz1820 ÓÚ 2009-03-02 12:23:22·¢±í:

    ¿ÉÄÜÊÇÎÒûÓÐ˵Çå³þ¡£ÎÒµÄÒâ˼ÊÇ£¬linuxÓÐûÓÐ×Ô´øµÄº¯Êý£¬ÎҵijÌÐòÔÊÐíÖУ¬Í¨¹ýµ÷ÓÃËü£¨ËüÃÇ£©£¬°ÑÎҵijÌÐòÔËÐеĴíÎóÐÅÏ¢Êä³öµ½Ò»¸öÖ¸¶¨µÄÎļþÀïÍ·¡£¶ø²»ÐèÒªÓÃ×Ô¼ºÐ´µÄmylog_write(char* logmsg)µÈº¯Êý¡£

  8. wang7131984 ÓÚ 2009-03-02 11:51:04·¢±í:

    :0w5ty(1²»ÖªµÀÄã˵Щʲô¡«£¬
    #include
    openlog
    syslog
    closelog
    ÕâÈý¸öÊÇÔÚ³ÌÐòÖÐʹÓÃÈÕÖ¾¶ø²»ÊÇÖ±½ÓÊä³ö³ÌÐò¿ÉÄÜÐèÒª·µ»ØµÄÏûÏ¢µÄϵͳµ÷Óá£
    ʹÓÃman 3 syslogµ÷Óò鿴ÆäÓ÷¨£¬Ò»°ãÖ»ÓÐÊØ»¤½ø³Ì²Å»áʹÓÃ