winstonjs/winston-syslog — 138★ trên GitHub (JavaScript). A syslog transport for winston
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
tldr;?: To break the winston codebase into small modules that work together.
The winston codebase has been growing significantly with contributions and other logging transports. This is awesome. However, taking a ton of additional dependencies just to do something simple like logging to the Console and a File is overkill.
Usage
To use the Syslog transport in winston, you simply need to require it and then either add it to an existing winston logger or pass an instance to a new winston logger:
In addition to the options accepted by the syslog (compliant with RFC 3164 and RFC 5424), the Riak transport also accepts the following options. It is worth noting that the riak-js debug option is set to false by default:
host: The host running syslogd, defaults to localhost.
port: The port on the host that syslog is running on, defaults to syslogd's default port.
protocol: The network protocol to log over (e.g. tcp4, udp4, tls4, unix, unix-connect, etc), defaults to udp4.
protocolOptions: Socket connect options. See net.socket.connect for available options.
path: The path to the syslog dgram socket (i.e. /dev/log or /var/run/syslog for OS X).
pid: PID of the process that log messages are coming from (Default process.pid).
facility: Syslog facility to use (Default: local0).
localhost: Host to indicate that log messages are coming from (Default: localhost).
type: The type of the syslog protocol to use (Default: BSD, also valid: '3164', '5424', 'RFC3164' or 'RFC5424').
app_name: The name of the application (Default: process.title).
eol: The end of line character to be added to the end of the message
(Default: Message without modifications).
secureProtocol: See https://nodejs.org/api/tls.html#tlscreatesecurecontextoptions for more information on this option,
passed through from this constructor.
ciphers: See https://nodejs.org/api/tls.html#tlscreatesecurecontextoptions for more information on this option,
passed through from this constructor.
ecdhCurve: See https://nodejs.org/api/tls.html#tlscreatesecurecontextoptions for more information on this option,
passed through from this constructor.
rejectUnauthorized: See https://nodejs.org/api/tls.html#new-tlstlssocketsocket-options for more information on this option,
passed through from this constructor.
requestCert: See https://nodejs.org/api/tls.html#new-tlstlssocketsocket-options for more information on this option,
passed through from this constructor.
Metadata: Logged as string compiled by glossy.
By default, syslog messages are produced by glossy, but you can override that behavior by providing a
custom Producer instance via the customProducer setting.
Log Levels
Because syslog only allows a subset of the levels available in winston, levels that do not match will be ignored. Therefore, in order to use winston-syslog effectively, you should indicate to winston that you want to use the syslog levels:
The Syslog transport will only log to the level that are available in the syslog protocol. These are (in increasing order of severity):
debug
info
notice
warning
err
crit
alert
emerg
Syslog Configuration
You will have to configure your syslog server to accept TCP or UDP connections.
This is usually done in /etc/syslog-ng.conf. Let's say you have an app called fnord
and want to use TCP, the configuration would look something like this:
Now if you have another app, called bnord, create similar destination and filter configurations for it, and specify a new log statement, with the same source:
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/winstonjs/winston-syslog là nguồn chính thức.
winstonjs/winston-syslog có bao nhiêu sao?
winstonjs/winston-syslog có 138 sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/winstonjs/winston-syslog. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
winstonjs/winston-syslog có phải mã nguồn mở không?
Có — winstonjs/winston-syslog phát hành theo license MIT, nghĩa là mã nguồn mở để đọc, fork và (tùy license) tái sử dụng. Mã: github.com/winstonjs/winston-syslog.
winstonjs/winston-syslog có trang demo không?
Dự án có trang chủ ở http://github.com/winstonjs/winston-syslog. Tab "Readme" ở trang này thường có ảnh chụp và hướng dẫn bắt đầu nhanh.
winstonjs/winston-syslog là gì?
winstonjs/winston-syslog (winstonjs/winston-syslog) là dự án JavaScript trên GitHub. Theo mô tả gốc: A syslog transport for winston
Đọc đầy đủ README ở tab phía trên.
Muốn nghe thêm một ý kiến về winston-syslog?
Hỏi một AI đọc được trang này — một cú bấm là có ngay nhận định về winston-syslog.