Skip to content

Instantly share code, notes, and snippets.

@marzdgzmn
Last active December 21, 2018 16:58
Show Gist options
  • Save marzdgzmn/da9c0eb69a6fa9647531e8ffbeecf2eb to your computer and use it in GitHub Desktop.
Save marzdgzmn/da9c0eb69a6fa9647531e8ffbeecf2eb to your computer and use it in GitHub Desktop.
at_exit do
puts 'sync at_exit'
if $ERROR_INFO
puts 'yeaah'
error = {
timestamp: Time.now,
message: $ERROR_INFO.message,
backtrace: $ERROR_INFO.backtrace,
}
LOG.error YAML.dump(error)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment