Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds tagged logging support and Logger::Formatter support #23

Closed
wants to merge 33 commits into from

Conversation

meltingice
Copy link

Builds on @mitnal's PR, which adds tagged logging support, and also adds support for logger formatters.

# Example formatter.
# Unlike most formatters, message is a hash.
# Must return a hash as well.
class MyGelfFormatter < Logger::Formatter
  def call(severity, datetime, facility, message)
    message.merge({
      pid: Process.pid
    })
  end
end
config.log_tags = [:uuid, :remote_ip]
config.logger = GELF::Logger.new("localhost", 12201, 'LAN', {
  tags: [:uuid, :remote_ip] # same order as config.log_tags !
})

config.logger = MyGelfFormatter.new

AlekSi and others added 30 commits October 28, 2011 16:21
Wow, I can commit via web interface on iPad from a train!
Add more rubies to Travis-CI config
fixes chunking for subclasses of GELF::Notifier
thx for the hint, @edmundoa :)

fixes graylog-labs#13
Use default facility if progname is blank
This adds some basic API information to the README file, which didn't have any documentation about the API before. Some parts are copied from the wiki.
Add basic API usage information to README
@joschi
Copy link
Contributor

joschi commented May 6, 2015

Thanks for contributing to this project! To continue merging this PR, we need you to sign our Individual Contributor Assignment Agreement as described in https://www.graylog.org/contributing-to-graylog/

@meltingice Would you mind cleaning up those commits a little bit and rebase to current master? There are some unintended changes in this PR, like the unresolved conflicts in .travis.yml.

@joschi joschi added the needs-ca label May 6, 2015
@milgner
Copy link
Contributor

milgner commented Aug 21, 2016

Seems like this is partly a duplicate of #35 now. Also, besides history cleanup, would you mind creating separate PRs for formatter support and tagged logging?

@jalogisch
Copy link

@milgner I would like to close this PR - CLA is still beding and this is kind of outdated and might need some love.

How would you decide?

@jalogisch
Copy link

As if the missing CLA i'll close this PR now

@jalogisch jalogisch closed this Mar 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants