Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
remote_syslog_logger
Advanced tools
This library providers an ActiveSupport compatible logger that logs directly to a remote syslogd via UDP.
The easiest way to install remote_syslog_logger
is with Bundler. Add
remote_syslog_logger
to your Gemfile
.
If you are not using a Gemfile
, run:
$ [sudo] gem install remote_syslog_logger
Use from Rails:
config.logger = RemoteSyslogLogger.new('syslog.domain.com', 514,
:program => "rails-#{RAILS_ENV}",
:local_hostname => "optional_hostname")
With Rails 3+ if you want to use tagged logging wrap in a TaggedLogging
instance:
config.logger = ActiveSupport::TaggedLogging.new(
RemoteSyslogLogger.new(
'syslog.domain.com', 514,
:program => "rails-#{RAILS_ENV}",
:local_hostname => "optional_hostname"
)
)
Use from Ruby:
require 'remote_syslog_logger'
$logger = RemoteSyslogLogger.new('syslog.domain.com', 514)
To point the logs to your local system, use localhost
and ensure that
the system's syslog daemon is bound to 127.0.0.1
.
Remote Syslog Logger is available on GitHub, which can be browsed at:
http://github.com/papertrail/remote_syslog_logger
and cloned with:
$ git clone git://github.com/papertrail/remote_syslog_logger.git
If the specified host cannot be resolved, syslog.domain.com
in the
example under the usage section above, remote_syslog_logger
will block
for approximately 20 seconds before displaying an error. This could
result in the application failing to start or even stopping responding.
Workarounds for this include:
/etc/hosts
or equivalent, so that DNS is not
actually consultedAll log lines are truncated to a maximum of 1024 characters. This restriction comes from RFC 3164 section 4.1:
The total length of the packet MUST be 1024 bytes or less.
Additionally, the generally-accepted MTU of the Internet is 1500 bytes, so regardless of the RFC, UDP syslog packets longer than 1500 bytes would not arrive. For details or to use TCP syslog for longer messages, see help.papertrailapp.com.
There is a max_size
option to override this restriction, but it should only be
used in extraordinary circumstances. Oversize messages are more likely to be
fragmented and lost, with some receivers rejecting them entirely.
By default, the program
value is set to the name and ID of the invoking
process. For example, puma[12345]
or rack[3456]
.
The program
value is used to populate the syslog "tag" field, must be 32
or fewer characters. In a few cases, an artifact of how the app is launched
may lead to a default program
value longer than 32 characters. For example,
the thin
Web server may generate a default program
value such
as:
thin server (0.0.0.0:3001)[11179]
If this occurs, the following exception will be raised when a
RemoteSyslogLogger
is instantiated:
Tag must not be longer than 32 characters (ArgumentError)
To remedy this, explicitly provide a program
argument which is shorter than
32 characters. See Usage.
Once you've made your great commits:
remote_syslog_logger
git checkout -b my_branch
git push origin my_branch
You might want to checkout Resque's Contributing wiki page for information on coding standards, new features, etc.
Copyright (c) 2011-2016 Eric Lindvall. See LICENSE for details.
FAQs
Unknown package
We found that remote_syslog_logger demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.