class GoogleLogger::Loggers::LocalLogger
Constants
- SEVERITY_MAPPING
Public Instance Methods
build_entry(payload, entry_args = {})
click to toggle source
Builds a new entry
@param [String, Hash] payload content of the log @param [Hash] entry_args arguments which would normally be passed to google entry
@return [Hash] entry with payload and default resource configuration
# File lib/google_logger/loggers/local_logger.rb, line 26 def build_entry(payload, entry_args = {}) entry_args[:payload] = payload entry_args end
write_entry(entry)
click to toggle source
Writes an entry to google cloud
@param [Hash] entry entry to be written to google cloud
return [Boolean] `true` if the entry was successfully written
# File lib/google_logger/loggers/local_logger.rb, line 36 def write_entry(entry) log_level = SEVERITY_MAPPING[entry[:severity]] || :unknown configuration.local_logger.public_send(log_level, entry.inspect) true end