Comments (4)
You don't set the IP, PORT on logstaher. You use Logstash for that.
@nicolas-besnard What if logstash is running on a different box? How do I tell logstasher where that box is? logstash-logger makes it clear how to do that.
from logstasher.
@shadabahmed: I think this issue can be closed.
from logstasher.
LogStasher.logger = LogStashLogger.new ...
quite hacky, but works.
from logstasher.
I've been implementing logstash since I've had occasional issues running out of disk space when our sever has been targeted. I wanted to do the same to prevent the need to write to a file at all and to write to logstash via UDP.
The answer above using LogStasher.logger =
didn't seem to work for me in both an initializer and my .rb file since the LogStasher.logger
gets overridden at somepoint after this.
The solution for me was to add this as part of the configuration hash as such:
config.logstasher.logger = LogStashLogger.new(port: 5228)
FYI: Another possibility for resolving the issue I have comes from #136:
config.logstasher.logger = Logger.new(Rails.root.join('log', "logstash_#{Rails.env}.log"), 1, 1.megabyte)
from logstasher.
Related Issues (20)
- Custom Fields only works when an Exception is handled HOT 3
- Custom fields are not being added to Request statements in logstasher log HOT 2
- Respect config.log_tags configuration option. HOT 2
- Adding custom fields at the Controller level HOT 1
- Gem initialization not working on MacOS Sierra and later HOT 4
- What's the difference between add_custom_fields and add_custom_fields_to_request_context HOT 3
- Exclude controller parameters HOT 2
- Configuring rotation of logstasher log file HOT 1
- suppress_app_log: true prevent DB timing to be emited HOT 6
- Response Body? HOT 2
- What type of objects can we pass as custom fields ?
- NameError: uninitialized constant LogStasher::ActiveRecord HOT 1
- Logging after action has been processed.
- Cant convince logstasher to write to file instead of console
- How to push logs in elasticsearch HOT 1
- ActiveJob::Logging::LogSubscriber not being unsubscribed HOT 1
- Logstasher custom fields in ApplicationController
- Default message for log lines
- Default log level HOT 3
- Missing ActionContoller event fields due to `#process_action` monkey patch HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from logstasher.