syslog用法

来源:互联网 发布:js中disabled 编辑:程序博客网 时间:2024/06/07 04:44

  函数:syslog()

  功能:记录至系统记录。
  头文件:#include <syslog.h>
  语法: int syslog(int priority, string message);
  返回值: 整数
  函数种类: 操作系统与环境
  内容说明 :
  本函数将 message 字符串写到系统纪录中,参数 priority 的值可能为 LOG_EMERG、LOG_ALERT、LOG_CRIT、LOG_ERR、LOG_WARNING、LOG_NOTICE、LOG_INFO、 LOG_DEBUG。本函数呼叫 UNIX 操作系统的 syslog() 函数,在 Windows NT 上,使用事件检视器模拟出本功能。
  syslog为每个事件赋予几个不同的优先级:
  LOG_EMERG:紧急情况。
  LOG_ALERT:应该被立即改正的问题,如系统数据库被破坏。
  LOG_CRIT:重要情况,如硬盘错误。
  LOG_ERR:错误。
  LOG_WARNING:警告信息。
  LOG_NOTICE:不是错误情况,但是可能需要处理。
  LOG_INFO:情报信息。
  LOG_DEBUG:包含情报的信息,通常只在调试一个程序时使用。
  建议最好可以参照系统的日志方面的知识来理解该函数。
  Kiwi’s syslog daemon 是一个装在服务器上的一个应用软件,可以实时显示通过防火墙的所有访问信息,并可以以文件的形式用日期命名保存到硬盘,以供查看。但其信息内容的格式不具备可看性。
  Kiwi Syslog Server Highlights
  Easily search on text strings to find a specific log message and view your syslog data from anywhere with enhanced web access!
  Quickly filter results and build filtered views with dynamic filtering!
  Immediately see when product updates are available with enhanced product update notifications!
  Now supports Microsoft Windows? 7 and Microsoft Windows Server? 2008 R2!
  Filter messages and create advanced alerts with Advanced Script Processing
  Log to any database with ODBC logging
  Schedule archiving and log maintenance by using Automated Log Archive
  View syslog messages in multiple windows simultaneously
  Automatically perform actions based on alerts, including sending email, forwarding messages, triggering audible alarms, sending SNMP trap messages, and paging IT staff
  Retain the original source IP on forwarded messages as one of many advanced forwarding options
  Forward Windows event log messages from your Windows servers to your Kiwi Syslog Server using the included Log Forwarder for Windows
  Produce trend analysis graphs and email syslog traffic statistics
  Leverage and share user-created rules, filters and scripts with the Community Content Exchange on thwack.
  Kiwi Syslog Server 与 LogViewer 提供市场上最值得信赖的基于 Windows 的 syslog 服务器解决方案之一。这些产品的安装与配置非常简单,提供功能丰富的解决方案来接收、记录、显示并转发各种网络设备(例如路由器、交换机、Unix 主机以及其它启用 syslog 的设备)的 syslog 消息。
  接收并管理您网络设备中的 syslog 消息
  同时显示多个窗口中的 syslog 消息
  按主机名称、主机 IP 地址、优先级、消息文本关键字或时间来过滤消息
  提供基于消息内容、消息量或元数据的高级警报
  自动执行基于警报的操作,包括发送邮件、转发消息、触发声音警报、发送 SNMP 陷阱消息与寻呼 IT 人员
  生成趋势分析图表与电子邮件syslog 流量统计
  在交换机命令中,可以使用logging on,logging buffer,logging trap来对系统的日志信息进行处理,logging trap可对存储的日志信息按级别存储,级别分为七个,分别对应上面的syslog()函数的7个priority 的值。
原创粉丝点击